Overview
The Windows 7 Sensor & Location Platform enables your applications to adapt to the current environment and change the way they look, feel or behave. Here are few examples:
Figure 1
Modified MSDN Reader that uses an ambient light sensor to change contrast, size and color saturation
The Sensor & Location Platform has many advantages compared to proprietary solutions:
- Hardware-independence: No need to learn and invest in a particular vendor's API; all sensors types are handled very similarly
- Privacy: Because Microsoft recognizes that sensor and location data are private, personally identifying information, all sensors are disabled by default. You can enable/disable sensors at any time via the Control Panel. Applications might prompt you to enable specific sensors via a secure consent UI.
- Application sharing: Multiple applications can consume data from the same sensor simultaneously
- Location simplicity: The Location API lets you obtain the location without caring about the particular mechanism used to obtain the information, for example, GPS, cell-tower or Wi-Fi hotspot triangulation. The Location API automatically chooses the most accurate sensor data available. In addition, you don't need to implement GPS protocols such as NMEA.
Objectives
In this Hands-On Lab, you will learn how to integrate Windows 7 Sensor support into your application, including:
- Detecting connected sensors
- Detecting sensor state
- Requesting user consent if access to a sensor is not enabled
- Handling data events from sensors
System Requirements
You must have the following items to complete this lab: