Edit

Share via


Sensor API

Overview of the Sensor API technology.

The Sensor API technology is not associated with any headers.

For programming guidance for this technology, see:

Enumerations

 
MagnetometerAccuracy

Specifies the accuracy of the magnetometer.
SensorConnectionType

Defines types of sensor device connections.
SensorState

Defines possible operational states for sensors.

Functions

 
Add

Adds a sensor to the collection.
CheckLocationCapability

Gets the location capability of the Windows Store app of the given thread.
Clear

Empties the sensor collection.
GetAt

Retrieves the sensor at the specified index in the collection.
GetCategory

Retrieves the identifier of the sensor category.
GetCount

Retrieves the count of sensors in the collection.
GetData

Retrieves the most recent sensor data report.
GetEventInterest

Retrieves the current event interest settings.
GetFriendlyName

Retrieves the sensor name that is intended to be seen by the user.
GetGlobalLocationPermission

Gets the status of the system setting that allows users to change location settings.
GetID

Retrieves the unique identifier of the sensor.
GetProperties

Retrieves multiple sensor properties.
GetProperty

Retrieves a property value.
GetSensorByID

Retrieves a pointer to the specified sensor.
GetSensorsByCategory

Retrieves a collection containing all sensors associated with the specified category.
GetSensorsByType

Retrieves a collection containing all sensors associated with the specified type.
GetSensorValue

Retrieves a single data field value from the data report.
GetSensorValues

Retrieves a collection of data field values.
GetState

Retrieves the current operational state of the sensor.
GetSupportedDataFields

Retrieves a set of PROPERTYKEYs that represent the data fields the sensor can provide.
GetTimestamp

Retrieves the time at which the data report was created.
GetType

Retrieves the sensor type ID.
OnDataUpdated

Provides sensor event data.
OnEvent

Provides custom event notifications.
OnLeave

Provides notification that a sensor device is no longer connected.
OnSensorEnter

Provides notification when a sensor device is connected.
OnStateChanged

Provides a notification that a sensor state has changed.
Remove

Removes a sensor from the collection. The sensor is specified by a pointer to the ISensor interface to be removed.
RemoveByID

Removes a sensor from the collection. The sensor to be removed is specified by its ID.
RequestPermissions

Opens a system dialog box to request user permission to access sensor data.
SetEventInterest

Specifies the list of sensor events to receive.
SetEventSink

Specifies the interface through which to receive sensor event notifications.
SetEventSink

Specifies the interface through which to receive sensor manager event notifications.
SetProperties

Specifies sensor properties.
SupportsDataField

Indicates whether the sensor supports the specified data field.
SupportsEvent

Indicates whether the sensor supports the specified event.

Interfaces

 
ILocationPermissions

Provides the status of the system setting that allows users to change location settings.
ISensor

Represents a sensor.
ISensorCollection

Represents a collection of sensors, such as all the sensors connected to a computer.
ISensorDataReport

Represents a sensor data report. Sensor data reports contain data field values generated by a sensor and a time stamp that indicates when the data report was created.
ISensorEvents

The callback interface you must implement if you want to receive sensor events.
ISensorManager

Provides methods for discovering and retrieving available sensors and a method to request sensor manager events.
ISensorManagerEvents

The callback interface for receiving sensor manager events.