访问 Sensor.TYPE_TEMPERATURE 时只能获取 false 值返回
谷歌文档涵盖了除温度传感器之外的每一个传感器,但继续说你可以访问这些数据……真是太糟糕了,文档的某些部分非常好,而且非常好。对别人不好。
我从其他传感器获取数据没有问题,所以我很确定我的代码是好的。希望了解如何检索温度传感器值的现场信息。
The Google doc's cover every one of the sensors except the temperature sensor, but continue to say that you can access that data...........it's aggrevating as heck, the doc's are very good in some parts and very bad in others.
I have no problem getting the data from the other sensors so I'm quite sure my code is good. Would love some insite on how to retrieve the temp sensors value(s).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Android 中,轮询传感器数据时,
当没有报告特定传感器的事件时,“False”值将返回到您的应用程序。
请验证您的低级实施是否正常工作。
记录您的内核驱动程序并观察它们是否按照 Android 传感器 HAL 的预期报告事件。
祝你好运!
-CVS
In Android, when polling for a sensor's data,
a value of 'False' is returned to your app when no events for your particular sensor have been reported.
Please verify that your low-level implementation is working fine.
Log your kernel-drivers and watch if they are reporting events as expected by the Android Sensor HAL.
GoodLUCK!
-CVS