O'Reilly logo

Windows Phone 7 Recipes: A Problem-Solution Approach 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

Chapter 6. Sensors

This chapter covers the use of sensors on Windows Phone 7. The base requirements for manufacturers are the accelerometer, compass, proximity sensor, light, and A-GPS. In this version of the SDK, from your code, you can have access only to the accelerometer and A-GPS. But don't worry—even with these two things, you can create high-impact applications for the user.

An accelerometer measures acceleration forces (for example, gravity or movement). The accelerometer API is built on top of the sensor framework (so when we will have access to the other sensors exposed by the API, we will use them all at the same way. The accelerometer data are exposed by the AccelerometerReadingEventArgs class, which exposes three properties for the ...

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