O'Reilly logo

Sams Teach Yourself Android Game Programming in 24 Hours by Jonathan S. Harbour

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

Hour 11. Using the Linear Acceleration and Proximity Sensors

What You’ll Learn in This Hour

• How to use a linear acceleration sensor

• How to use a proximity sensor

The previous hour introduced the sensors supported by the Android OS. Depending on the manufacturer, some Android devices will come with some sensors, and some will not, so we have to check the hardware to see if a certain sensor is available. For most game designs, advanced sensors are not needed. But a game custom-designed for a certain unique sensor, or two or three, might be very fascinating, indeed! In this hour, you learn how to use two of the advanced sensors: the linear acceleration sensor and the proximity sensor. The remaining sensors that will be studied over the next ...

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