I have an exists mobile project (both android and ios), now I need to build a small game by cocos2dx and embed it in to my project, as my question, is there anyway to do it? I haven’t found any solution to do that.
Thanks and best regards.
Check this user’s Android implementation as a reference to how you can accomplish what you’re after: https://github.com/intmainreturn00/CocoSlice
2 Likes
Use JNI. Not so long ago I tested this feature. I created my activity in android studio, and at the touch of a button it opened the cocos activity, transmitted data there, and the game started. Then back, by pressing the button in cocos, cocos opened my activity and also sent the data. I was testing the possibility of integrating and interacting cocos with the native capabilities of the android platform. I think everything is quite feasible (useful link).
1 Like