SensorCollector

abstract class SensorCollector(val context: Context, val sensorDelay: SensorDelay = SensorDelay.FASTEST, var accuracyChangedListener: SensorCollector.OnAccuracyChangedListener? = null)

Base class for sensor collectors. This collector does not have an internal buffer, and consequently out of order measurements can be notified.

Inheritors

Constructors

Link copied to clipboard
constructor(context: Context, sensorDelay: SensorDelay = SensorDelay.FASTEST, accuracyChangedListener: SensorCollector.OnAccuracyChangedListener? = null)

Types

Link copied to clipboard

Interface to notify when sensor accuracy changes.

Properties

Link copied to clipboard

listener to notify changes in accuracy.

Link copied to clipboard

Android context.

Link copied to clipboard
abstract val sensor: Sensor?

Sensor being used to obtain measurements or null if not available. This can be used to obtain additional information about the sensor.

Link copied to clipboard

Indicates whether requested sensor is available or not.

Link copied to clipboard

Delay of sensor between samples.

Functions

Link copied to clipboard
fun start(): Boolean

Starts collecting sensor measurements.

Link copied to clipboard
fun stop()

Stops collecting sensor measurements.