public interface CompassListener
Modifier and Type | Method | Description |
---|---|---|
void |
onCompassAccuracyChange(int compassStatus) |
This gets invoked when the compass accuracy status changes from one value to another.
|
void |
onCompassChanged(float userHeading) |
Callback's invoked when a new compass update occurs.
|
void onCompassChanged(float userHeading)
CompassEngine.addCompassListener(CompassListener)
and implementing these
callbacks. Note that this interface is also used internally to to update the UI chevron/arrow.userHeading
- the new compass headingvoid onCompassAccuracyChange(int compassStatus)
SensorManager
class constants:
SensorManager.SENSOR_STATUS_NO_CONTACT
SensorManager.SENSOR_STATUS_UNRELIABLE
SensorManager.SENSOR_STATUS_ACCURACY_LOW
SensorManager.SENSOR_STATUS_ACCURACY_MEDIUM
SensorManager.SENSOR_STATUS_ACCURACY_HIGH
compassStatus
- the new accuracy of this sensor, one of
SensorManager.SENSOR_STATUS_*