minimumActivityRecognitionConfidence property

int? minimumActivityRecognitionConfidence
getter/setter pair

The minimum motion-activity confidence to conclude a device is moving.

Defaults to 75%. Each activity-recognition-result returned by the API is tagged with a "confidence" level expressed as a %. You can set your desired confidence to trigger a BackgroundGeolocation.onMotionChange event.

This setting can be helpful for poor quality Android devices missing crucial motion sensors (accelerometer, gyroscope, magnetometer) by adjusting the confidence lower.

Example

BackgroundGeolocation.ready(Config(
  minimumActivityRecognitionConfidence: 50 // <-- trigger less confidently.
));

Implementation

int? minimumActivityRecognitionConfidence;