react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

When sharing background-location it takes more than 1000 meters to share location every time

Open Dany-Rolon opened this issue 1 year ago • 1 comments

Your Environment

  • Plugin version: 4.14.6
  • Platform: iOS
  • OS version: 17.3.1
  • Device manufacturer / model: Iphone14Plus
  • React Native version (react-native -v): 0.72.4
  • Plugin config
BackgroundGeolocation.ready({
      disableLocationAuthorizationAlert: true,
      disableElasticity: true,
      disableStopDetection: true,
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
      distanceFilter: 10,
      stopTimeout: 5,
      debug: false,
      logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
      stopOnTerminate: false,
      startOnBoot: true,
      url,
      batchSync: false,
      autoSync: true,
      preventSuspend: true,
      heartbeatInterval: 60,
      headers: {
        authorization: `Bearer ${user.token}`,
      }
    })

Expected Behavior

When sharing location in background the distance between each location should be smaller, like in Android

Actual Behavior

In iOS devices, locations are far apart from each other, and during a car trip, it takes more than 1000 meters to share each location. We cannot observe any stable pattern, as sometimes it takes 500 meters between each location, other times it takes 100, 300, or 1000 meters to share the location. On Android, it works totally differently, and the routes are clearly identifiable. This happens to us when sharing the location in the background, as it is shared correctly in the foreground.

Context

Here is a picture that shows how Android and IOS devices tracks my car trip when are in background. Yellow line are locations from an Android device, is very accurate, but IOS (red line) for a similar trip just sends 10 locations. There are more than 200 meters between some points, enought distance to turn on location services on IOS and start tracking, but unfortunately we are getting just a few locations.

evidence

These are another tests, where we cannot observe any stable pattern between each locations, when sharing in background

image image (1)

Debug logs

Logs
PASTE_YOUR_LOGS_HERE

Dany-Rolon avatar Feb 23 '24 18:02 Dany-Rolon

  • See wiki "Debugging".
  • See API docs Config.debug.
  • Learn to fetch the plugin's incredibly verbose logs. See API docs .emailLog.
  • Also learn how to use the plugin's debugging server. See API docs Config.transistorAuthorizationToken.

christocracy avatar Feb 23 '24 19:02 christocracy

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Apr 17 '24 01:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 01 '24 01:05 github-actions[bot]