From java to C++
First define a native function declaration inside java code.
public static native void setAction(int arg);
This can be used for invoke function connection from java code in the form:
This is all from java side since all the job is made from C++ side.
JNIEXPORT void JNICALL Java_com_cnx_eyerismain_MyCustomAppService_setAction(JNIEnv env, jobject obj, jint action)
qDebug()<<"****** eyeris_main onReceiveAction"<<action;
// call MainWindow::onReceiveMounted from Qt thread
qDebug()<<"can tell here that message is received "<<action;
globalIsNewAction = true;
globalCurrentAction = action;