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