Summary
The Sensors API provides interfaces to various hardware sensors including:
- Accelerometer
- Ambient Light
- Compass
- Magnetometer
- Orientation
- Proximity
- Rotation
- Tap
Requirement |
Description |
Sensor Availability |
- It shall be possible to query what sensors are available on the device. Using this information it shall be possible to determine what sensor data, from the table below, is available on the device.
|
Stream Sensor Data |
- It shall be possible to be notified of changes in sensor data.
- If sensor data is not changing then no data shall be received on the stream.
- These notifications can be turned on and off for particular sensor data types.
|
Reduce Sensor Update Frequency |
- It shall be possible to reduce the frequency of senor updates. This shall happen at the API level and not at the hardware level.
- There may be multiple users of the same sensor that each reduce the sensor update frequency to different levels.
|
Combine Sensor Data |
- The API shall aim to combine sensor data where appropriate. This is to avoid the need for application developers to check the time stamps on sensor data updates when working with multiple sensors.
|
User Extensions |
- It shall be possible for users to implement their own sensors and have them be accessible from this API.
|