Hour 13. Creating Your Own “Tricorder”

What You’ll Learn in This Hour

Encapsulating the Android sensors

• Using the gyroscope sensor

• Using the magnetic field sensor

• Using the ambient light sensor

• Using the temperature sensor

This hour draws together the information on the Android sensors from the past two hours into one place and adds the additional sensors into a single sample program that displays all of them at once. In addition to those sensors previously covered, several new ones will be included in this final hour on sensors: gyroscope, compass, light detector, and thermometer. Using multiple sensors in one program is useful because you have seen examples with only one sensor at a time up to this point. Although it will be rare ...

Get Sams Teach Yourself Android Game Programming in 24 Hours 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.