I\'ve found that when I start up my game the compass is often out of whack. Objects will fly around and not be where they\'re supposed to be. But, if I move the phone in a f
In SensorEventListener
there is a function onAccuracyChanged(Sensor sensor, int accuracy)
in which you can check the accuracy of the device's magnetometer. There are 4 levels of accuracy (from class SensorManager
):
SENSOR_STATUS_ACCURACY_HIGH = 3
SENSOR_STATUS_ACCURACY_MEDIUM = 2
SENSOR_STATUS_ACCURACY_LOW = 1
SENSOR_STATUS_UNRELIABLE = 0