当前位置: 动力学知识库 > 问答 > 编程问答 >

cocos2d x - How to transform information to Cocos code in the Android platform

问题描述:

I know we can use JNI to interact java and c++, but during my project, I want to complete the network in the java code, after that I want to leave the java code, and evoke the callback function in Cocos code.

网友答案:

make a callback in Java; in that java_callback() invoke a JNI function; in the JNI function, invoke a cocos_callback(); and there you have it ;)

分享给朋友:
您可能感兴趣的文章:
随机阅读: