Windows Sensor and Location Platform This is a

  • Slides: 36
Download presentation

Windows® Sensor and Location Platform

Windows® Sensor and Location Platform

This is a partial diagram of the Sensor and Location Platform, showing only sensor-related

This is a partial diagram of the Sensor and Location Platform, showing only sensor-related parts

#include <sensorsapi. h> #include <sensors. h> // Get all the ALS sensors on the

#include <sensorsapi. h> #include <sensors. h> // Get all the ALS sensors on the system // Owner window // Collection of sensors requiring permissions // Modal flag

// Get the sensor reading from the ISensor. Data. Report object // Extract the

// Get the sensor reading from the ISensor. Data. Report object // Extract the float value from the PROPVARIANT object float // Normalize the light sensor data double // // Handle UI changes based on the normalized LUX data which ranges from 0. 0 - 1. 0 for a lux range of 0 lux to 100, 000 lux, this method represents such a handler that would be implemented in your application return }

ISensor. Events

ISensor. Events

Accelerometer 3 D Sensor. Manager. Accelerometer 3 D if Sensor. Manager = Accelerometer 3

Accelerometer 3 D Sensor. Manager. Accelerometer 3 D if Sensor. Manager = Accelerometer 3 D null; Int. Ptr , true

void Sensor. Data. Report Accelerometer 3 DReport Console "X: {0} Y: {1} Z: {2}"

void Sensor. Data. Report Accelerometer 3 DReport Console "X: {0} Y: {1} Z: {2}"

Method Description

Method Description

Method Description

Method Description

Method Description

Method Description

Method Description

Method Description

Value LOCATION_REPORT_STATUS enumeration: Description

Value LOCATION_REPORT_STATUS enumeration: Description

Method Description Used to set default location (just like the Control Panel applet does)

Method Description Used to set default location (just like the Control Panel applet does) or specifically get the default location

var new Civic. Address. Location. Provider true var Console Int. Ptr Civic. Address. Location.

var new Civic. Address. Location. Provider true var Console Int. Ptr Civic. Address. Location. Report "Country/region: “

var new Civic. Address. Location. Provider Int. Ptr true Location. Provider Location. Report var

var new Civic. Address. Location. Provider Int. Ptr true Location. Provider Location. Report var Console Civic. Address. Location. Report "Country/region: "

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U. S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.