1 <html devsite> 2 <head> 3 <title>Interaction</title> 4 <meta name="project_path" value="/_project.yaml" /> 5 <meta name="book_path" value="/_book.yaml" /> 6 </head> 7 <body> 8 <!-- 9 Copyright 2017 The Android Open Source Project 10 11 Licensed under the Apache License, Version 2.0 (the "License"); 12 you may not use this file except in compliance with the License. 13 You may obtain a copy of the License at 14 15 http://www.apache.org/licenses/LICENSE-2.0 16 17 Unless required by applicable law or agreed to in writing, software 18 distributed under the License is distributed on an "AS IS" BASIS, 19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 See the License for the specific language governing permissions and 21 limitations under the License. 22 --> 23 24 25 26 <p>From the perspective of Android applications, every Android sensor is an 27 independent entity, meaning there is no interaction between the different 28 sensors.</p> 29 <ul> 30 <li> This is true even though several Android sensors might share the same 31 underlying physical sensor </li> 32 <li> For example: step counter, significant motion and accelerometer, all relying on 33 the same physical accelerometer, must be able to work concurrently </li> 34 <li> This is also true for wake-up and non-wake-up versions of the same sensor </li> 35 </ul> 36 <p>Android sensors must be able to work simultaneously and independently of one 37 another. That is, any action on one Android sensor must not impact the behavior 38 of the other sensors.</p> 39 <p>Specifically, at the HAL level:</p> 40 <ul> 41 <li> activating a sensor </li> 42 <li> deactivating a sensor </li> 43 <li> changing the sampling frequency of a sensor </li> 44 <li> changing the maximum reporting latency of a sensor </li> 45 </ul> 46 <p>cannot cause:</p> 47 <ul> 48 <li> another activated sensor to stop working </li> 49 <li> another activated sensor to change sampling rate </li> 50 <li> another activated sensor to decrease the quality of its measurements </li> 51 <li> another non-activated sensor to start delivering events </li> 52 </ul> 53 <p>Nor can any of the actions above prevent actions (activation, deactivation, 54 and parameter changes) on another sensor from succeeding. For instance, 55 whether we can activate the step counter must be independent of whether the 56 accelerometer is currently activated. </p> 57 <p>As another important example, a wake-up sensor activated at 5Hz must generate events 58 at around 5Hz, even if its non-wake-up variant is being activated at 100Hz.</p> 59 60 </body> 61 </html> 62