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

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