本文介绍了如何检查精度值上OnAccuracyChanged方法传感器事件监听活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在的作品作为指南针应用程序,虽然我要校准加速度计和磁感应传感器,以使其更有效地

I'm making an application that works as a compass, though I want to calibrate the accelerometer and the magneticfield sensors to make it more efficient.

从API我明白,这是可能的,而且有一些价值观,你可以检查,例如:

From the API I understand that this is possible, and that there are some values that you can check, for example:

SENSOR_STATUS_ACCURACY_HIGH

我怎样才能达到这个值?

How can I achieve this value?

我在 OnAccuracyChanged 思考,但不知道怎么办!

I was thinking inside OnAccuracyChanged, but don't know how!

推荐答案

您监听的OnAccuracyChanged方法由系统中,当传感器开始报告有不同的精度调用 - 这是你从传感器得到的东西,这样你就可以未设置。的SensorManager API已经得到了一些枚举,让你检查什么的精度是传感器的报告。

The OnAccuracyChanged method of your listener is invoked by system, when a sensor begins to report with different accuracy - this is something you receive from the sensor, so you can not set it. SensorManager API has got some enumerations to let you check what accuracy is a sensor reporting at.

这篇关于如何检查精度值上OnAccuracyChanged方法传感器事件监听活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 14:56