| <html devsite> |
| <head> |
| <title>Interaction</title> |
| <meta name="project_path" value="/_project.yaml" /> |
| <meta name="book_path" value="/_book.yaml" /> |
| </head> |
| <body> |
| <!-- |
| Copyright 2017 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| |
| |
| <p>From the perspective of Android applications, every Android sensor is an |
| independent entity, meaning there is no interaction between the different |
| sensors.</p> |
| <ul> |
| <li> This is true even though several Android sensors might share the same |
| underlying physical sensor </li> |
| <li> For example: step counter, significant motion and accelerometer, all relying on |
| the same physical accelerometer, must be able to work concurrently </li> |
| <li> This is also true for wake-up and non-wake-up versions of the same sensor </li> |
| </ul> |
| <p>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.</p> |
| <p>Specifically, at the HAL level:</p> |
| <ul> |
| <li> activating a sensor </li> |
| <li> deactivating a sensor </li> |
| <li> changing the sampling frequency of a sensor </li> |
| <li> changing the maximum reporting latency of a sensor </li> |
| </ul> |
| <p>cannot cause:</p> |
| <ul> |
| <li> another activated sensor to stop working </li> |
| <li> another activated sensor to change sampling rate </li> |
| <li> another activated sensor to decrease the quality of its measurements </li> |
| <li> another non-activated sensor to start delivering events </li> |
| </ul> |
| <p>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. </p> |
| <p>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.</p> |
| |
| </body> |
| </html> |