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_CONTACTSensorManager.SENSOR_STATUS_UNRELIABLESensorManager.SENSOR_STATUS_ACCURACY_LOWSensorManager.SENSOR_STATUS_ACCURACY_MEDIUMSensorManager.SENSOR_STATUS_ACCURACY_HIGHcompassStatus - the new accuracy of this sensor, one of
SensorManager.SENSOR_STATUS_*