Package com.trimblemaps.mapsdk.location
Interface CompassEngine
public interface CompassEngine
Interface defining the source of compass heading data that is
consumed by the
LocationComponent when in compass related
RenderMode or
CameraModes.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompassListener(CompassListener compassListener) Adds aCompassListenerthat can be used to receive heading and state changes.intProvides the last know accuracy status from the sensor manager.floatReturns the last heading value produced and pushed via a compass listener.voidremoveCompassListener(CompassListener compassListener) Removes aCompassListenerthat can be used to receive heading and state changes.
-
Method Details
-
addCompassListener
Adds aCompassListenerthat can be used to receive heading and state changes.- Parameters:
compassListener- to be added
-
removeCompassListener
Removes aCompassListenerthat can be used to receive heading and state changes.- Parameters:
compassListener- to be removed
-
getLastHeading
float getLastHeading()Returns the last heading value produced and pushed via a compass listener.- Returns:
- last heading value
-
getLastAccuracySensorStatus
int getLastAccuracySensorStatus()Provides the last know accuracy status from the sensor manager.An integer value which is identical to the
SensorManagerclass constants:SensorManager.SENSOR_STATUS_NO_CONTACTSensorManager.SENSOR_STATUS_UNRELIABLESensorManager.SENSOR_STATUS_ACCURACY_LOWSensorManager.SENSOR_STATUS_ACCURACY_MEDIUMSensorManager.SENSOR_STATUS_ACCURACY_HIGH
- Returns:
- last accuracy status
-