O'Reilly logo

Windows Phone Recipes: A Problem-Solution Approach, Second Edition by Emanuele Garofalo, Fabio Claudio Ferracchiati

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

C H A P T E R  6

Sensors

This chapter covers the use of sensors on Windows Phone. The base requirements for manufacturers are the accelerometer, compass, proximity sensor, light, and A-GPS. In this version of Windows Phone, you have access to Accelerometer, Compass, and Gyroscope.

An accelerometer measures acceleration forces, such as gravity or movement. The accelerometer, like the other sensors, is built extending the class SensorBase<TSensorReading>, where TSensorReading implements the interface ISensorReading. When we have access to the other sensors exposed by the API, we will use them all in the same way. The accelerometer data are exposed by the AccelerometerReadingEventArgs class, which exposes three properties for the x-, y-, and z-axis ...

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