call android api in ndk

call android api in ndk
0.0 0


how can i call android api in my cocos2d-x c++ code?Every time i do it the program crashes:(


You can read the source in cocos2d-x/CocosDenshion/android/jni as the sample.


one more question…if the android API called from c++ is UI related will it still work?


You can refer CCMessageBox() implemented on Android. It invoke the Dialog widget from c++.