Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Interaction
Stay organized with collections
Save and categorize content based on your preferences.
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
cannot cause:
- 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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-08-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-26 UTC."],[],[],null,["# Interaction\n\nFrom the perspective of Android applications, every Android sensor is an\nindependent entity, meaning there is no interaction between the different\nsensors.\n\n- This is true even though several Android sensors might share the same underlying physical sensor\n- For example: step counter, significant motion and accelerometer, all relying on the same physical accelerometer, must be able to work concurrently\n- This is also true for wake-up and non-wake-up versions of the same sensor\n\nAndroid sensors must be able to work simultaneously and independently of one\nanother. That is, any action on one Android sensor must not impact the behavior\nof the other sensors.\n\nSpecifically, at the HAL level:\n\n- activating a sensor\n- deactivating a sensor\n- changing the sampling frequency of a sensor\n- changing the maximum reporting latency of a sensor\n\ncannot cause:\n\n- another activated sensor to stop working\n- another activated sensor to change sampling rate\n- another activated sensor to decrease the quality of its measurements\n- another non-activated sensor to start delivering events\n\nNor can any of the actions above prevent actions (activation, deactivation,\nand parameter changes) on another sensor from succeeding. For instance,\nwhether we can activate the step counter must be independent of whether the\naccelerometer is currently activated.\n\nAs another important example, a wake-up sensor activated at 5Hz must generate events\nat around 5Hz, even if its non-wake-up variant is being activated at 100Hz."]]