react-native-background-geolocation
react-native-background-geolocation copied to clipboard
Geolocation is skipping location in android after change in still mode to driving/walking mode.
We are facing issue for android platform of skipping location, Library stop pushing data on backend after some time interval. Example: If we are in still mode from last 7-8 hours and after that we start walking then we are not getting data on backend but after couple of minutes we are getting our data but it's only providing last location and all previous data is missed.
Our configurations are mentioned below, Please help us to resolve this issue.
await BackgroundGeolocation.ready({ url: API_URL + API_ENDPOINTS.SAVELOCATION, logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, distanceFilter: 10, stopTimeout: 5, autoSync: true, batchSync: true, disableProviderChangeRecord: true, autoSyncThreshold: 5, maxBatchSize: 10, stopOnTerminate: false, startOnBoot: true, enableHeadless: true, maxDaysToPersist: 3, logMaxDays: 5, locationAuthorizationRequest: 'Always', locationTemplate: '{"Latitude":<%= latitude %>,"Longitude":<%= longitude %>,"TimeStamp": "<%= timestamp %>","Uuid": "<%= uuid %>","Event": "<%= event %>","IsMoving": <%= is_moving %>,"Age":<%= age %>,"Speed":<%= speed %>,"Odometer":<%= odometer %>,"Mock":<%= mock %>,"Activity": "<%= activity.type %>","Activityconfidence": "<%= activity.confidence %>","Accuracy": <%= accuracy %>,"AltitudeAccuracy": <%= altitude_accuracy %>,"Altitude": <%= altitude %>,"Heading": <%= heading %>,"Level": <%= battery.level %>,"IsCharging": <%= battery.is_charging %>}', backgroundPermissionRationale: { title: "Allow {applicationName} to access this device's location even when closed or not in use.", message: 'This app collects location data to enable recording your trips to work and calculate distance-travelled.', positiveAction: 'Change to "{backgroundPermissionOptionLabel}"', negativeAction: 'Cancel', },