Wrapper of the Android native_app_glue framework to implement app.nit
The framework provides 3 different structures for a single C application under Android. We use all 3 structures in this API to implement app.nit on Android. Each structure is wrapped in a Nit extern class:
NativeAppGlueis the lowest level class, it is implemented by the C structure
android_app. It offers features on the main Android thread (not on the same thread as Nit). For this reason, prefer to use
NdkNativeActivityis implemented by the C structure
ANativeActivity. It is on the same thread as Nit and manages the synchronization with the main Android thread.
NativeNativeActivityis implemented in Java by
android.app.NativeActivity, which is a subclass of
Context(in Java). It represent main activity of the running application. Use it to get anything related to the
Contextand as anchor to execute Java UI code.