Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
266 views
in Technique[技术] by (71.8m points)

android - 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.

question from:https://stackoverflow.com/questions/65877775/location-not-updating-on-server-when-app-enters-stationary-and-app-is-in-backgro

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...