O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

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

Using Sensors to Create a Compass

The Android OS supports a number of types of sensors. Generally, the sensors are either motion, environmental, or position sensors. Motion sensors detect how the device is moving, environmental sensors capture various measures of the device’s ambient environment (for example, the light level), and position sensors capture information that can be used to determine the physical position of the device. Not all devices have all the sensors that the OS supports. This fact has implications for how you code access to the sensors.

Accessing sensor information is not particularly important for the MyContactList app. However, understanding how these are accessed could be important for future apps you develop. In the case ...

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