In this chapter, we learnt different ways to interact with Android natively using input and sensors. We discovered how to handle touch events. We also read key events from keyboard and D-Pad and processed trackballs motion events. Finally, we have turned the accelerometer into a Joypad. Because of Android fragmentation, expect specificities in input device's behavior and be prepared to adapt your code.
We have already been far in the capabilities of Android NDK in terms of application structure, graphics, sound, input, and sensors. But reinventing the wheel is not a solution! In the next chapter, we are going to unleash the real power of Android by porting existing libraries.