I have an android app which has native code. The native code needs to get a particular value from java code; this value updates regularly, so I need to get it when I need to
You need to delete the local ref to the value returned by
env->CallStaticObjectMethod(bridgeClass, method)
as follows:
jobject returnValue = env->CallStaticObjectMethod(bridgeClass, method); // ... env->DeleteLocalRef(returnValue);