gpt4 book ai didi

android - Android 的接近传感器如何工作?

转载 作者:行者123 更新时间:2023-11-30 02:49:22 24 4
gpt4 key购买 nike

我正在阅读 Android API我看到了这个

The proximity sensor lets you determine how far away an object is from a device. The following code shows you how to get an instance of the default proximity sensor

The proximity sensor is usually used to determine how far away a person's head is from the face of a handset device (for example, when a user is making or receiving a phone call). Most proximity sensors return the absolute distance, in cm, but some return only near and far values. The following code shows you how to use the proximity sensor:

“通常使用”的关键语句和术语“对象”的一般用法。

我可以指定对象应该是我面前树上的苹果吗?该文档并没有真正让我了解接近位置传感器的工作原理。还是传感器是插在外部物体上的芯片,android 可以拾取?

最佳答案

我希望它只是发射红外光束并测量反射回来的光量。参见 http://thecodeartist.blogspot.com/2011/01/proximity-sensor-on-android-gingerbread.html?m=1

关于android - Android 的接近传感器如何工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24472695/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com