I'm trying to trigger some Java code when certain trackables are identified. Right now, I'm able to accomplish this via JNI:
jmethodID method = javaEnv->GetMethodID(javaClass, "myJavaMethod", "(I)V");
javaEnv->CallVoidMethod(javaObj, method, b);
But, it seems that this introduces some instability with the rendering code, causing the application to crash intermittently. If I remove the JNI calls, the crashes go away.
What's the best (and most stable) way to execute small bits of Java code when a trackable is identified in the camera's view?