16. Accessing Android’s Hardware Sensors

The Android Software Development Kit provides a variety of application programming interfaces for accessing low-level hardware features on the device. In addition to the camera, Android devices might have a number of other sensors and hardware. Some popular device sensors include the magnetic and orientation sensors, light sensors, and temperature sensors. Applications can also access battery state information. In this chapter, you explore the optional hardware APIs provided as part of the Android SDK.

Interacting with Device Hardware

The Android platform allows unprecedented access to the device’s underlying hardware in a secure and robust manner. Because not all Android devices support or contain all ...

Get Android Wireless Application Development Volume II: Advanced Topics, Third 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.