i wanna interact with android activity in cocos2dx .cpp class, but i don’t know how to get the jobject ref.
here’s my activity def:
package com.loy.puzzles;
public class Puzzles extends Cocos2dxActivity{
public void cppCall_nonStatic_logsth(){ /…/ }
}
in my .cpp code fragment
————
JniMethodInfo minfo;
JniHelper::getMethodInfo(minfo, “com/loy/puzzles/Puzzles”, “cppCall_nonStatic_logsth”, “()V”);
————
but i don’t know how to invoke the method…
JNIEnv CallVoidMethod need a jobject, which reference to Puzzles activity, but how can i get this reference?