Call Function in Java from cocos2d

Call Function in Java from cocos2d
0.0 0


Hi ,

I want to know the way how to call function in java form cocos2d through JNI



Please read these sources:
* cocos2d-x/CocosDenshion/android/jni/SimpleAudioEngineJni.cpp
* cocos2d-x/tests/
* cocos2d-x/tests/

They shows how to wrap & invoke into a c++ class.


So, SimpleAudioEngineJni.cpp is wrapping methods from Cocos2dxActivity, which wraps, which wraps MediaPlayer?


That’s right.


what header files or libraries will I need to include?