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 Details

    • addCompassListener

      void addCompassListener(@NonNull CompassListener compassListener)
      Adds a CompassListener that can be used to receive heading and state changes.
      Parameters:
      compassListener - to be added
    • removeCompassListener

      void removeCompassListener(@NonNull CompassListener compassListener)
      Removes a CompassListener that 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 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
      Returns:
      last accuracy status