By sushiljha
on Mon, 05/06/2013 - 10:22
Hi,
On a button click in UI, I want to send a boolean data from java code to native code. Can someone suggest me how to do it. I am able to send data from native to java code but I am getting stuck doing it other way round. I am using eclipse for development. I am developing on top of Video Playback sample application
Thank you,
Sushil
How to send data from app (java) to native
Hi, how to communicate between Java and C++ (in both directions) with JNI is explained in this article:
https://developer.vuforia.com/resources/dev-guide/java-native-interface
How to send data from app (java) to native
Thank You very much for your quick reply AlessandroB. I will go through it.
Sushil
How to send data from app (java) to native
I do have a doubt after reading the link you shared AlessandroB. Is it possible to write a handler in native code which can be invoked by app code.
How to send data from app (java) to native
Hi, if you mean a Java Handler (from the Android SDK Handler class), no, of course there is no such thing in C++;
however you can structure your code so to implement a Handler in Java and just call the relevant "core" functionality in C++ using native functions.
How to send data from app (java) to native
Thank You for your advice. It worked for me :)
How to send data from app (java) to native
Thank You for your advice. It worked for me :)
How to send data from app (java) to native
Glad to help!