readSensor

suspend fun readSensor(context: Context, sensorType: Int, durationMs: Int? = null): List<SensorReading>?

Backwards-compatible wrapper over sampleSensor: returns the readings, or null if the sensor is absent or produced no reading in time. Prefer sampleSensor, which distinguishes the two.