March 2013
Intermediate to advanced
346 pages
8h 4m
English
The previous recipe described how the interface defined in native_activity.h allows us to create native activity. However, all the callbacks defined
are invoked with the main UI thread, which means we cannot do heavy processing in the callbacks.
Android SDK provides AsyncTask, Handler, Runnable, Thread, and so on, to help us handle things in the background and communicate with the main UI thread. Android NDK provides a static library named android_native_app_glue to help us execute callback functions and handle user inputs in a separate thread. This recipe will discuss the android_native_app_glue library in detail.
The android_native_app_glue library is built on top of the ...