O'Reilly logo

Xamarin Studio for Android Programming: A C# Cookbook by Mathieu Nayrolles

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 the accelerometer and other sensors

The Accelerometer records the device acceleration in three dimensions, that is, along the x, y, and z axis. Almost all phones are now shipped with an accelerometer as it's a pretty old technology. Indeed, the very first phone to have one was the Apollo 11 Lunar Module. A phone with wheels. Actually, the first mainstream and terrestrial phone equipped with this technology was the Samsung SCH-S310 in 2005 on which you could dial numbers by writing them in the air. Today's application of the accelerometer are almost all related to games. In this recipe, we will detect if the phone is falling; this can be useful for the elderly in the sense that we can be warned of emergencies automatically.

Getting ready

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