How to check accuracy values on OnAccuracyChanged method in sensor event listening Activity?

后端 未结 2 1449
清歌不尽
清歌不尽 2021-01-24 21:44

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.

From the API I

2条回答
  •  粉色の甜心
    2021-01-24 22:09

    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.

提交回复
热议问题