GameActivity is an Android Activity
modeled on the API of NativeActivity
, but with a few changes to make it a better starting point for game developers.
androidx.appcompat.app.AppCompatActivity
- allowing you to use Jetpack components architecture (and still use some of the newer platform features on older Android devices).SurfaceView
that allows you to interface with any other Android UI element.NativeActivity
, and to the android_native_app_glue library.Use the script to build the GameActivity AAR and inject the C++ source files.
cd GameActivity && ./build.sh
Note that this is a temporary workaround (in the future, running
./gradlew :GameActivity:assembleRelease
should be enough).
The AAR is outputed in out/outputs/aar/GameActivity.aar
(out
directory being where you cloned the Android Game SDK). It contains GameActivity, both the Java class and its C++ implementation, and the “android_native_app_glue” library.
Refer to the integration guide for now. Link to it and other documentation will be added here later.