Chapter    24

Using Sensors

Android devices often come with hardware sensors built in, and Android provides a framework for working with those sensors. Sensors can be fun. Measuring the outside world and using that in software in a device is pretty cool. It is the kind of programming experience you just don’t get on a regular computer that sits on a desk or in a server room. The possibilities for new applications that use sensors are huge, and we hope you are inspired to realize them.

In this chapter, we’ll explore the Android sensor framework. We’ll explain what sensors are and how we get sensor data, and then discuss some specifics of the kinds of data we can get from sensors and what we can do with it. While Android has defined several sensor ...

Get Pro Android 5, Fifth 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.