In Chapter 1, Setting Up Your Development Environment, when we were installing all the required components for building the Cocos2d-x framework, we told you to download and install Android Native Development Kit (NDK), which allows us to build the Android applications by using the C++ language instead of using the mainstream Java technology core for which the Android API has been written.
When an Android application is launched, it looks in its AndroidManisfest.xml
file for an activity definition that has the intent filter android.intent.action.MAIN
, and then it will run the Java class. The following listing shows the segment of the AndroidManifest.xml
file generated by the Cocos new script, where the activity to be launched when the Android application starts is specified:
<activity android:name="org.cocos2dx.cpp.AppActivity" android:configChanges="orientation" android:label="@string/app_name" android:screenOrientation...