~~Call a JNI function from Java side which allows JNI to save the JNIEnv for later use in c++
~~c++ calls the JNI functions with the saved-in-memory JNIEnv variables.
-JNI calls Java, which calls the openfeint SDK and API.
But I do not get how does cocos2dx call the JNI functions (step two). In the guide, they had it defined as static methods in a class, but how do you reference it from your cocos2d-x games? Am I missing something in the Android .mk files? I do not know how to make them connect together (cocos2d-x and JNI). Can anyone help me with this?
Just do it. You must creat OpenFeintUtils.java with method “showLeaderboard”.
Only need to include “JniHelper.h” and “jni.h”, and you can call java method like me