Functions to read various input sensors on the device.
This file defines the sensor service, which provides functions for reading the various input sensors that are available on the device, including the accelerometer, magnetometer, temperature, illuminance, and so on.
The sensors are listed by the enumeration sensor_type_t. To see if a sensor is supported on the device call sensor_is_supported(). To start receiving sensor events, call sensor_request_events() and pass in the sensor type. To set the refresh rate of the sensor, call the sensor_set_rate() function. To specify whether duplicate sensor events should be skipped, call the sensor_set_skip_duplicates() function.
The sensors return a variety of different data, so depending on which sensor you want to use, you need to call a different sensor_event_get_* function to retrieve the readings. See the individual functions to determine which sensors they work with.
To stop receiving sensor events, call the sensor_stop_events() function.
- BlackBerry 10.0.0
Last modified: 2013-09-30