Yeah, many users new to JNI and NativeActivity might not know what to do, for them we can include some example code. Like assign an empty callback for onCreate, and attach the main native thread to the JVM thread etc… I don’t think we will need a cocos2dx callback for onCreate, maybe just some sample code in the generated project.
A really useful cocos2dx callback would be something for orientation change. RIght now iOS and Android callbacks for orientation change work differently (they have different parameters, different ways to register them, etc) and a unified cocos2dx callback will be useful.
Some issues with orientation change: height and width of visible screen area stay the same for full screen apps, but on Android devices like Nexus4 with on-screen buttons or with not-full-screen iOS apps with status bar visible, app window’s visible height and width change on orientation change because of new location of buttons and status bar.
Another issue with IOS is that width and height values are not swapped after orientation change, cocos2dx code will need to manually check if it is landscape or portrait, and then swap the height/width values if needed.
Overall, cocos2dx orientation change callback will need a size parameter (instead of a enum newOrientationID). It will also help cocos2dx to support resizing of app on Mac OSX and Windows desktop.
I will be happy to share my code for this if you need.