public interface CompassEngine
LocationComponent
when in compass related
RenderMode
or
CameraMode
s.Modifier and Type | Method and Description |
---|---|
void |
addCompassListener(CompassListener compassListener)
Adds a
CompassListener that can be used to
receive heading and state changes. |
int |
getLastAccuracySensorStatus()
Provides the last know accuracy status from the sensor manager.
|
float |
getLastHeading()
Returns the last heading value produced and pushed via
a compass listener.
|
void |
removeCompassListener(CompassListener compassListener)
Removes a
CompassListener that can be used to
receive heading and state changes. |
void addCompassListener(@NonNull CompassListener compassListener)
CompassListener
that can be used to
receive heading and state changes.compassListener
- to be addedvoid removeCompassListener(@NonNull CompassListener compassListener)
CompassListener
that can be used to
receive heading and state changes.compassListener
- to be removedfloat getLastHeading()
int getLastAccuracySensorStatus()
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