On the java side, when there is a message received, java function
JavaMessageReceived(int msgNo, int msgLen, int[] msgData, long msgTimestamp)
will be called, so the information of the message will be stored in msgNo, msgLen, msgData and msgTimestamp.
Then I would like to pass the value in msgNo, msgLen and msgData, msgTimestamp to a function in c++ side(application), called
CppGotMessage(int *no, int *len, int*data, long* timestamp)
When I call CppGotMessage()
I will get the information of the received message.
How do I do this via JNI?(can't use JNA or other third software)
From this link:
http://doc-snapshot.qt-project.org/qdoc/qandroidjniobject.html
I noticed the ResigterNatives won't work for me, because when I call CppGotMessage on c++ side, I don't have any arguments to pass to the java function. I just need to got the value from the java function and store them in my CppGotMessage function's parameters..