From the perspective of Android applications, every Android sensor is an independent entity, meaning there is no interaction between the different sensors.
- This is true even though several Android sensors might share the same underlying physical sensor
- For example: step counter, significant motion and accelerometer, all relying on the same physical accelerometer, must be able to work concurrently
- This is also true for wake-up and non-wake-up versions of the same sensor
Android sensors must be able to work simultaneously and independently of one another. That is, any action on one Android sensor must not impact the behavior of the other sensors.
Specifically, at the HAL level:
- activating a sensor
- deactivating a sensor
- changing the sampling frequency of a sensor
- changing the maximum reporting latency of a sensor
- another activated sensor to stop working
- another activated sensor to change sampling rate
- another activated sensor to decrease the quality of its measurements
- another non-activated sensor to start delivering events
Nor can any of the actions above prevent actions (activation, deactivation, and parameter changes) on another sensor from succeeding. For instance, whether we can activate the step counter must be independent of whether the accelerometer is currently activated.
As another important example, a wake-up sensor activated at 5Hz must generate events at around 5Hz, even if its non-wake-up variant is being activated at 100Hz.