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 ...

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.