O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required