March 2013
Intermediate to advanced
346 pages
8h 4m
English
Input events are essential for user interaction in Android apps. This recipe discusses how to detect and handle input events in Android NDK.
We will further develop the example in last recipe. Please read the Managing native windows at Android NDK recipe before going through this one.
The following steps create a sample application, which detects and handles input events at the native code:
NativeInputs. Set the package name as cookbook.chapter5.nativeinputs. Please refer to the Loading native libraries and registering native methods recipe of Chapter 2, Java Native Interface, if you want more detailed instructions.