I want to start an Android activity that read qr code and use the resulting string in the OpenFL Android application (the launcher). How can i do that?
To return the result, you can either poll regularly (make another JNI function called
getQRResult() and call that every second or so), or you can use this. If you go with the latter, note that
JNI is now
HaxeObject is now
You can use a template to include the Java source file in your app:
<template path="path/to/QR.java" rename="src/com/example/packagename/QR.java" />
Thanks. I will be appliying it soon.
I am having the same issue now, I want to get the result from a startActivityForResult call but the above link for not making use of the poll object is lost.
Anyone has any idea to get back the result from an Android Activity?
After some researching I have found HaxeObject class that you can use in Java and makes life much easier to integrate Haxe with Java.
For other people who can be interested I leave this topic where you can find some good advices and code.