mauron85 / react-native-background-geolocation

Background and foreground geolocation plugin for React Native. Tracks user when app is running in background.
Apache License 2.0
1.33k stars 559 forks source link

Getting location updates too frequently #548

Open junaidrazaq opened 3 years ago

junaidrazaq commented 3 years ago

Hi, I am having an issue where I receive the updated location every 16 seconds when using my iOS device, or using the iOS simulator. How can I make it so that I get location updates every 3-4 mins? I know there is a distance filter where you can define a distance in meters to update the location when travelled this amount, but having already configured this, I still receive constant updates every 16 seconds, even when stationary. This is happening when I have the app opened btw. Here is my configuration for reference =>

BackgroundGeolocation.configure({ locationProvider: BackgroundGeolocation.RAW_PROVIDER, desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY, stationaryRadius: 5000, distanceFilter: 50000, notificationTitle: 'Background tracking', notificationText: 'enabled', debug: true, startOnBoot: false, stopOnTerminate: true, locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER, // DISTANCE_FILTER_PROVIDER for interval: 100000, stopOnStillActivity: false, });

Am I doing something wrong?