2021年1月25日星期一

Location not updating on server when app enters stationary and app is in background or is closed

I'm having a problem with stationary, 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. I'm using this library in react native https://github.com/mauron85/react-native-background-geolocation, here's my config...

  desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,    locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER,    stationaryRadius: 1,    distanceFilter: 1,    notificationTitle: 'Sample',    notificationText: 'Location Tracking',    startOnBoot: true,    stopOnTerminate: true,    interval: 2500,    fastestInterval: 2500,    activitiesInterval: 2500,    stopOnStillActivity: false,  

after a minute the symbol of the location in android is gone in the status bar. I also used ACTIVITY_PROVIDER for android but it seems like its not accurate it jumps to location to another. How to prevent this from happening? thank you for your help.

https://stackoverflow.com/questions/65877775/location-not-updating-on-server-when-app-enters-stationary-and-app-is-in-backgro January 25, 2021 at 09:16AM

没有评论:

发表评论