-
Notifications
You must be signed in to change notification settings - Fork 436
Description
Required Reading
- Confirmed
Plugin Version
4.18.3
Mobile operating-system(s)
- iOS
- Android
Device Manufacturer(s) and Model(s)
iPhone 15 plus
Device operating-systems(s)
iOS 18.6.2
React Native / Expo version
0.77.0,
What happened?
We are currently using react-native-background-geolocation in the production version of our React Native iOS app. Users have reported occasional gaps in their location tracking and sometimes missing breadcrumbs, even when they have a strong network and signal. To investigate, I tested the demo app for a day to determine if the issue is related to our implementation or the library itself. I noticed similar gaps in breadcrumbs in the demo app. One pattern I observed is that when I remained stationary for more than 5-10 minutes, there were significant gaps between recorded locations.
I know the default stationary radius is 200 meters, meaning the device must move at least 200 meters to start tracking. You mentioned other factors like cell towers, wifi signals, and geographical obstructions, which I understand. I’ve noticed that sometimes the next location isn’t captured until I’m 1-2 miles away. Is there a way to ensure more consistent location updates and avoid these gaps? I’m not concerned about battery usage—accuracy is key for breadcrumb tracking. Also, if I drive to the same location again, the gaps don’t always occur, which makes it inconsistent. Our other native iOS app with the same feature doesn’t show this behavior.
Additionally, I didn’t see a stationary green trail for one location. Is this related to the same issue or is it different?

{
"id": 351096235,
"company_id": 23200,
"company_token": "costar",
"device_id": 90704,
"device_model": "iPhone15,5",
"created_at": "2025-09-07T21:44:22.195Z",
"framework": "react-native",
"version": "18.6.2",
"updated_at": "2025-09-08T00:20:31.826Z",
"activity_type": "still",
"activity_confidence": 33,
"battery_level": 0.8500000238418579,
"battery_is_charging": false,
"extras": {},
"is_moving": true,
"age": 36,
"odometer": 47258.6,
"uuid": "68AFEE8B-6EDB-4689-98B2-BD87A7431C77",
"timestamp": "2025-09-07T21:44:22.000Z",
"speed_accuracy": 0.31,
"speed": 5.55,
"longitude": -77.5746780327053,
"ellipsoidal_altitude": 43.83,
"floor": null,
"heading_accuracy": 7.26,
"latitude": 37.6460872771013,
"accuracy": 4.75,
"altitude_accuracy": 4.03,
"altitude": 77.24,
"heading": 279.14,
"recorded_at": "2025-09-07T21:44:22.000Z"
}
{
"id": 351096458,
"company_id": 23200,
"company_token": "costar",
"device_id": 90704,
"device_model": "iPhone15,5",
"created_at": "2025-09-07T21:48:13.424Z",
"framework": "react-native",
"version": "18.6.2",
"updated_at": "2025-09-08T00:20:31.826Z",
"activity_type": "in_vehicle",
"activity_confidence": 100,
"battery_level": 0.8500000238418579,
"battery_is_charging": false,
"extras": {},
"is_moving": true,
"age": 236,
"odometer": 49170.8,
"uuid": "28B59487-82EF-4E33-9806-5C1AE6862D88",
"timestamp": "2025-09-07T21:48:13.001Z",
"speed_accuracy": 0.08,
"speed": 4.61,
"longitude": -77.5742703242171,
"ellipsoidal_altitude": 42.47,
"floor": null,
"heading_accuracy": 2.2,
"latitude": 37.6633131292353,
"accuracy": 3.74,
"altitude_accuracy": 3,
"altitude": 75.88,
"heading": 30.87,
"recorded_at": "2025-09-07T21:48:13.001Z"
}
pls see these logs between 17:44 and 17:48, I see only two points on the map but the log shows more points between that time frame.

2025-09-07 17:44:22.034
📍<+37.64608728,-77.57467803> +/- 4.75m (speed 5.55 mps / course 279.14) @ 9/7/25, 5:44:22 PM Eastern Daylight Time
2025-09-07 17:44:22.034
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 20.0m | age: 33 ms
╚═══════════════════════════════════════════════════════════
2025-09-07 17:44:22.034 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 7.9
2025-09-07 17:44:22.034 ℹ️-[TSConfig persist]
2025-09-07 17:44:22.036 🔵-[TSConfig incrementOdometer:] 47258.6
2025-09-07 17:44:22.046 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 68AFEE8B-6EDB-4689-98B2-BD87A7431C77
2025-09-07 17:44:22.046
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2025-09-07 17:44:22.047 ✅-[BackgroundTaskManager createBackgroundTask] 1102
2025-09-07 17:44:22.049 ℹ️-[TSDBLogger db_save] Log committed
2025-09-07 17:44:22.050 ✅-[TSHttpService schedulePost] LOCKED: 68AFEE8B-6EDB-4689-98B2-BD87A7431C77
2025-09-07 17:44:22.243 🔵-[HttpResponse handleResponse] Response: 200
2025-09-07 17:44:22.244 ✅-[TSHttpService post:]_block_invoke DESTROY: 68AFEE8B-6EDB-4689-98B2-BD87A7431C77
2025-09-07 17:44:22.244
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════
2025-09-07 17:44:22.244 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 1102 OF (
1102
)
2025-09-07 17:44:24.218 🔵-[TSLocationManager beginStopDetection] ⏲Stop-timeout engaged: 300 s...
2025-09-07 17:44:24.232
📍<+37.64609987,-77.57479627> +/- 4.75m (speed 5.45 mps / course 279.14) @ 9/7/25, 5:44:24 PM Eastern Daylight Time
2025-09-07 17:44:24.232
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 8 ms
╚═══════════════════════════════════════════════════════════
2025-09-07 17:44:24.232 🔵-[TSLocationManager locationManager:didUpdateLocations:] stoppedAt is set. Bailing out
2025-09-07 17:44:46.530
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:44:46.530 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 22/300 s
2025-09-07 17:44:51.329
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:44:51.329 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 27/300 s
2025-09-07 17:45:15.965
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:45:15.965 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 51/300 s
2025-09-07 17:45:17.883
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:45:17.883 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 53/300 s
2025-09-07 17:45:23.011 ℹ️-[TSDBLogger db_save] Log committed
2025-09-07 17:45:23.643
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:45:23.644 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 59/300 s
2025-09-07 17:45:25.241
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:45:25.241 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 61/300 s
2025-09-07 17:45:28.442
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:45:28.443 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 64/300 s
2025-09-07 17:45:29.406
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:45:29.406 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 65/300 s
2025-09-07 17:45:49.239
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:45:49.239 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 85/300 s
2025-09-07 17:46:23.760 ℹ️-[TSDBLogger db_save] Log committed
2025-09-07 17:46:26.835
📍<+37.64847860,-77.58197065> +/- 78.22m (speed -1.00 mps / course -1.00) @ 9/7/25, 5:46:26 PM Eastern Daylight Time
2025-09-07 17:46:26.835
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 11 ms
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:26.835 🔵-[TSLocationManager locationManager:didUpdateLocations:] stoppedAt is set. Bailing out
2025-09-07 17:46:36.589
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:36.590 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 132/300 s
2025-09-07 17:46:39.789
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:39.789 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 135/300 s
2025-09-07 17:46:42.028
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:42.028 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 137/300 s
2025-09-07 17:46:46.508
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:46.508 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 142/300 s
2025-09-07 17:46:51.627
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:51.627 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 147/300 s
2025-09-07 17:46:53.226
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:53.226 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 149/300 s
2025-09-07 17:46:54.826
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:54.826 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 150/300 s
2025-09-07 17:46:56.106
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:46:56.106 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 151/300 s
2025-09-07 17:47:07.304
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:07.304 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 163/300 s
2025-09-07 17:47:09.227
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:09.228 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 165/300 s
2025-09-07 17:47:17.222
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:17.222 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 173/300 s
2025-09-07 17:47:23.838 ℹ️-[TSDBLogger db_save] Log committed
2025-09-07 17:47:32.899
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:32.899 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 188/300 s
2025-09-07 17:47:34.822
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:34.822 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 190/300 s
2025-09-07 17:47:37.058
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:37.058 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 192/300 s
2025-09-07 17:47:38.658
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:38.658 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 194/300 s
2025-09-07 17:47:41.217
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:41.217 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 196/300 s
2025-09-07 17:47:42.177
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:42.178 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 197/300 s
2025-09-07 17:47:43.777
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:43.777 🔵-[TSLocationManager detectStopMotion:shakeCount:] Stationary-time: 199/300 s
2025-09-07 17:47:59.166 🔵-[TSLocationManager onResume:] enabled? 1
2025-09-07 17:47:59.166 ℹ️-[LocationDAO purge:] 1
2025-09-07 17:47:59.168 ℹ️-[TSDBLogger db_save] Log committed
2025-09-07 17:47:59.175
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2025-09-07 17:47:59.175
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════
2025-09-07 17:48:13.218
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | in_vehicle/100 | isMoving: 1
added screenshots for your reference.
Let me know if you need more information.
Plugin Code and/or Config
I'm using your demo app and attached the config screenshots.