Location not updating on server when app enters stationary when app is in background or is closed
See original GitHub issueHello @mauron85
Environment:
- React Native version: 0.59.9
- Plugin version: 0.6.3
- Platform: Android
- OS version: 7
- Device manufacturer and model: Redmi Note 4
- Plugin configuration options:
BackgroundGeolocation.configure({
desiredAccuracy: 10,
stationaryRadius: 10,
distanceFilter: 5,
notificationTitle: 'Background Tracking',
notificationText: 'Enabled',
debug: true,
startOnBoot: true,
stopOnTerminate: false,
locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER,
interval: 5000,
url: url,
syncUrl: url,
httpHeaders: {
...this.props.headers
},
postTemplate: {
lat: '@latitude',
long: '@longitude',
id: id` // you can also add your own properties`
}
})
Location updates correctly when app is in foreground or when sent to background while user is moving but if app goes into stationary region while app is closed or is background location stops to update. Even if I travel distance once app goes to stationary region from background or terminate state it does not exit stationary region and stops updating location on server.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Location not updating on server when app enters stationary ...
I'm having a problem with stationary, Location updates correctly when app is in foreground or when sent to background while user is moving ......
Read more >Handling location updates in the background - Apple Developer
Configure your app to receive location updates when it isn't running in the foreground.
Read more >@jromagosa/cordova-plugin-background-geolocation - npm
Plugin's background geolocation service actually becomes foreground service when app is in the background. Confusing, right? :D.
Read more >Ionic Native - Background Geolocation
BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
Read more >Config | Capacitor Background Geolocation - GitHub Pages
With distanceFilter: 0, Sets the desired interval for location updates, ... iOS from suspending your app in the background while in the stationary...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Did you try this?
Hi, I’m getting the same problem. It seems like battery saver in android phones causing this. My phone is mi 10 lite and i followed this https://dontkillmyapp.com/xiaomi and now it is working fine. But how to prevent battery saver in react native to prevent this from happening?