MobilityDataRecorder

class MobilityDataRecorder(    val sensorManager: SensorManager,     val locationProvider: FusedLocationProviderClient,     val folderPath: String,     val locationRequest: LocationRequest = defaultLocationRequest) : DataRecorder

An aggregate recorder that records multiple sensors and locations into CSV

This recorder records data on the following sensors:

  • Accelerometer

  • Gyroscope

  • Magnetometer

  • Barometer

  • Location/GPS

The class cannot be reused after it has been closed. Another instance must be created to restart recording.

Constructors

Link copied to clipboard
fun MobilityDataRecorder(    sensorManager: SensorManager,     locationProvider: FusedLocationProviderClient,     folderPath: String,     locationRequest: LocationRequest = defaultLocationRequest)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()

Stops the data recording and cleans up all the resources

Link copied to clipboard
open suspend override fun start()

Starts the data recording

Properties

Link copied to clipboard
val folderPath: String

Path to save the recordings

Link copied to clipboard
val locationProvider: FusedLocationProviderClient

A provider client from that registers callback for location updates

Link copied to clipboard
val locationRequest: LocationRequest

Request containing the details of the location stream to record

Link copied to clipboard
val recorders: List<DataRecorder>
Link copied to clipboard
val sensorManager: SensorManager

Android sensor manager containing device sensor information