LocationComponentCompassEngine

This manager class handles compass events such as starting the tracking of device bearing, or when a new compass update occurs.

open class LocationComponentCompassEngine : CompassEngine, SensorEventListener

Constructors

LocationComponentCompassEngine
Link copied to clipboard

Construct a new instance of the this class. A internal compass listeners needed to separate it from the cleared list of public listeners.

open fun LocationComponentCompassEngine(windowManager: WindowManager, sensorManager: SensorManager)

Functions

addCompassListener
Link copied to clipboard

Adds a CompassListener that can be used to receive heading and state changes.

open fun addCompassListener(compassListener: CompassListener)
onAccuracyChanged
Link copied to clipboard
abstract fun onAccuracyChanged(p: Sensor, p1: Int)

{@inheritDoc}

open fun onAccuracyChanged(sensor: Sensor, accuracy: Int)
onSensorChanged
Link copied to clipboard
abstract fun onSensorChanged(p: SensorEvent)

{@inheritDoc}

open fun onSensorChanged(event: SensorEvent)
removeCompassListener
Link copied to clipboard

Removes a CompassListener that can be used to receive heading and state changes.

open fun removeCompassListener(compassListener: CompassListener)

Properties

lastAccuracySensorStatus
Link copied to clipboard
private open val lastAccuracySensorStatus: Int
lastHeading
Link copied to clipboard
private open val lastHeading: Float
SENSOR_DELAY_MICROS
Link copied to clipboard
val SENSOR_DELAY_MICROS: Int