O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

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

Measuring Force with the Accelerometer

The accelerometer sensor measures the force applied to the device. The sensor detects the force of gravity along with any forces resulting from the movement of the phone. When the device is stationary, this force is equal to that of earth’s gravity. Thus, when stationary, the accelerometer provides the position of the phone relative to the earth. When in the hands of a user, the accelerometer can be used to determine in which direction the user is moving the device, and when the phone is moved suddenly; while playing a game, for example, the force may exceed that of gravity.

The accelerometer is normally used for determining whether the phone is tilted. But it can also be used to allow the device to become ...

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