I\'m writing an OpenGL C/C++ application which i\'m porting to Android through Android NDK, JNI support. I\'m having difficulties executing code from JAVA callback signaled
You need to create global references to the class/object that you stash away. The references you're saving are local references, which can't be shared across threads and disappear when the runtime cleans up the JNI local reference stack.
Check out the Sun/Oracle documentation for global and local references, and check out JNI methods JNIEnv::NewGlobalRef and JNIEnv::DeleteGlobalRef.
gJClass = env->NewGlobalRef(env->FindClass( ... ));
gJObjectCached = env->NewGlobalRef(obj);
(Edit: Turns out you don't need global references for method IDs.)