Function startListeningForSensor
- startListeningForSensor(
sensors:
| "linearAcceleration"
| "magnetometer"
| "magnetometer_raw"
| "accelerometer"
| "accelerometer_raw"
| "gyroscope"
| "gyroscope_raw"
| "rotation"
| "orientation"
| "motion"
| "barometer"
| "proximity"
| "stationary"
| "stepCounter"
| "stepDetector"
| "temperature"
| "heartBeat"
| "heartRate"
| "humidity"
| "light"
| "gravity"
| "heading"
| (
| "linearAcceleration"
| "magnetometer"
| "magnetometer_raw"
| "accelerometer"
| "accelerometer_raw"
| "gyroscope"
| "gyroscope_raw"
| "rotation"
| "orientation"
| "motion"
| "barometer"
| "proximity"
| "stationary"
| "stepCounter"
| "stepDetector"
| "temperature"
| "heartBeat"
| "heartRate"
| "humidity"
| "light"
| "gravity"
| "heading"
)[],
listener: any,
updateInterval: number,
maxReportLatency?: number,
options?: {
headingDistanceAccuracy?: number;
headingDistanceFilter?: number;
headingFilter?: number;
headingTrueNorth?: boolean;
},
): Promise<boolean[]> Parameters
- sensors:
| "linearAcceleration"
| "magnetometer"
| "magnetometer_raw"
| "accelerometer"
| "accelerometer_raw"
| "gyroscope"
| "gyroscope_raw"
| "rotation"
| "orientation"
| "motion"
| "barometer"
| "proximity"
| "stationary"
| "stepCounter"
| "stepDetector"
| "temperature"
| "heartBeat"
| "heartRate"
| "humidity"
| "light"
| "gravity"
| "heading"
| (
| "linearAcceleration"
| "magnetometer"
| "magnetometer_raw"
| "accelerometer"
| "accelerometer_raw"
| "gyroscope"
| "gyroscope_raw"
| "rotation"
| "orientation"
| "motion"
| "barometer"
| "proximity"
| "stationary"
| "stepCounter"
| "stepDetector"
| "temperature"
| "heartBeat"
| "heartRate"
| "humidity"
| "light"
| "gravity"
| "heading"
)[] - listener: any
- updateInterval: number
Optional
maxReportLatency: numberOptional
options: {
headingDistanceAccuracy?: number;
headingDistanceFilter?: number;
headingFilter?: number;
headingTrueNorth?: boolean;
}
Returns Promise<boolean[]>