// CPP to JAVA communication
#include "platform/android/jni/JniHelper.h"
#include <jni.h>
I en knapp
cocos2d::JniMethodInfo methodInfo;
if (! cocos2d::JniHelper::getStaticMethodInfo(methodInfo, "org/cocos2dx/cpp/AppActivity", "alertJNI", "()V")) {
return;
}
methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID);
methodInfo.env->DeleteLocalRef(methodInfo.classID);
Inga kommentarer:
Skicka en kommentar