| <html devsite><head> |
| <title>交互性</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>从 Android 应用的角度来看,每个 Android 传感器都是一个独立的实体,这意味着不同传感器之间不存在交互性。</p> |
| <ul> |
| <li>即使几个 Android 传感器可能共享同一个底层物理传感器,也是如此</li> |
| <li>例如:全部依靠同一个物理加速度计的计步器、大幅度动作感测器和加速度计必须能够同时工作</li> |
| <li>对于同一传感器的唤醒和非唤醒版本也是如此</li> |
| </ul> |
| <p>Android 传感器必须能够同时并且彼此独立工作。也就是说,一个 Android 传感器上的任何操作都不能影响其他传感器的行为。</p> |
| <p>具体来说,在 HAL 级别:</p> |
| <ul> |
| <li>激活传感器</li> |
| <li>停用传感器</li> |
| <li>更改传感器的采样率</li> |
| <li>更改传感器的最大报告延迟</li> |
| </ul> |
| <p>不能造成:</p> |
| <ul> |
| <li>另一个激活的传感器停止工作</li> |
| <li>另一个激活的传感器改变采样率</li> |
| <li>另一个激活的传感器降低其测量的质量</li> |
| <li>另一个未激活的传感器开始传送事件</li> |
| </ul> |
| <p>上述任何操作也不能阻止在其他传感器上成功进行操作(激活、停用和更改参数)。例如,我们能否激活计步器与加速度计当前是否处于激活状态无关。</p> |
| <p>另一个重要的示例是,以 5 Hz 频率激活的唤醒传感器必须以大约 5 Hz 频率生成事件,即使其非唤醒版本以 100 Hz 频率被激活也是如此。</p> |
| |
| </body></html> |