Log in or register to post comments

How to send data from app (java) to native

May 6, 2013 - 3:22am #1

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

May 6, 2013 - 11:13pm #8

Glad to help!

How to send data from app (java) to native

May 6, 2013 - 5:37pm #7

Thank You for your advice. It worked for me :)

How to send data from app (java) to native

May 6, 2013 - 5:37pm #6

Thank You for your advice. It worked for me :)

How to send data from app (java) to native

May 6, 2013 - 3:56am #5

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

May 6, 2013 - 3:44am #4

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. This is possible from native to java code but other way around also is it possible to write a handler?

 

Thank You,

Sushil

How to send data from app (java) to native

May 6, 2013 - 3:35am #3

Thank You very much for your quick reply AlessandroB. I will go through it.

 

Sushil

How to send data from app (java) to native

May 6, 2013 - 3:31am #2

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

 

Log in or register to post comments