Location not updating on server when app enters stationary when app is in background or is closed using mauron85/react-native-background-geolocation

丶灬走出姿态 提交于 2020-06-16 17:07:41

问题


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.

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`
      }
    })

来源:https://stackoverflow.com/questions/61889407/location-not-updating-on-server-when-app-enters-stationary-when-app-is-in-backgr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!