Chapter 8. Handling Input Devices and Sensors

Android is all about interaction. Admittedly, that means feedback, through graphics, audio, vibrations, and so on. But there is no interaction without input! The success of today's smartphones takes its root in their multiple and modern input possibilities: touchscreens, keyboard, mouse, GPS, accelerometer, light detector, sound recorder, and so on. Handling and combining them properly is a key to enrich your application and to make it successful.

Although Android handles many input peripherals, the Android NDK has long been very limited in its support (not to say the very least), until the release of R5! We can now access it directly through a native API. Examples of available devices are:

  • Keyboard, ...

Get Android NDK Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.