react-native-background-geolocation
react-native-background-geolocation copied to clipboard
How do stopTimeout, disableMotionActivityUpdates and stationaryRadius play together?
Your Environment
Plugin version: ^4.12.0
Platform: iOS or Android iOS
OS version: 16.4
React Native version (react-native -v): 0.71.7
- Plugin config
export const BACKGROUND_GEOLOCATION_READY_CONFIG = {
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_MEDIUM,
stationaryRadius: 25,
disableElasticity: true,
distanceFilter: 50,
disableLocationAuthorizationAlert: true,
maxRecordsToPersist: 1,
stopOnTerminate: true,
stopTimeout: 5,
disableMotionActivityUpdates: true,
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_OFF,
showsBackgroundLocationIndicator: true,
allowIdenticalLocations: false,
foregroundService: true,
};
Context
I have a quetion regarding the behaviour of the module when disableMotionActivityUpdates is set to false. I wonder if
stopTimeout is still relevant then? So currently I am using the module with disableMotionActivityUpdates=true, so the Plug In has 5 minutes before it turns off location-services. It then goes into the stationary mode and only after moving out of the stationaryRadius (https://transistorsoft.github.io/react-native-background-geolocation/interfaces/config.html#stationaryradius) the module starts tracking again. However, when motionActivityUpdates are available, does the module then ever respect the stationaryradius? Additionally, is stopTimeout still relevant, or does it simply always start tracking as soon as movement is detected?
stationaryRadius is always used.