react-native-background-geolocation
react-native-background-geolocation copied to clipboard
DWELL / loiteringDelay is started but never ended on .startGeofences() IOS
Your Environment
- Expo
- Plugin version: 4.16.5
- Platform: iOS
- OS version: 17.4.1
- Device manufacturer / model: Iphone 13 pro
- React Native version (
react-native -v): "0.71.14 - Plugin config
BackgroundGeolocation.ready({ showsBackgroundLocationIndicator: false, stopTimeout: 10, debug: true, stationaryRadius: 100, logLevel: BackgroundGeolocation.LOG_LEVEL_OFF, logMaxDays: 0, distanceFilter: 1000, stopOnTerminate: false, startOnBoot: true, }).then((state) => { BackgroundGeolocation.startGeofences(); }
Expected Behavior
When I go into a geofence after I get: Geogence DWELL start: .. (480s), after 480s it should trigger DWELL
Actual Behavior
it triggers Geogence DWELL start: .. (480s) but then the app sleeps and never triggers DWELL unless I manually open the app.
It works well on .start() but not on .startGeofences().
Steps to Reproduce
- add a geofence with notifyOnDwell: true and loiteringDelay: 480000.
- walk in it
- I'm using debug mode
Likely fixed while working on #2113 (in private repo branch mentioned in that issue).
Likely fixed while working on #2113 (in private repo branch mentioned in that issue).
for radious geofences too? this issue is not for polygon geofences.
Yes
Yes
perfect, will test and update here (and close if it works).
Yes
unfortunately this is still an issue. DWELL start and it never ends unless I manually open the app
Configure logLevel for verbose logging. Fetch logs with .emailLog (see API docs)
I added the full logs to the main post.
In particular you can see that DWELL should have triggered at 12:44 but it triggered when I opened the app at 12:47. I repeated the test multiple times giving it more space and it never triggers unless I open the app
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2024-08-29 12:36:16.099 ✅-[BackgroundTaskManager createBackgroundTask] 59
2024-08-29 12:36:16.099 🎾-[TSGeofenceEvent startLoiteringAt:callback:] Geofence DWELL start: ChIJ2WEEbYRZwokRDTfV0NcZRnA (480 s)
2024-08-29 12:36:16.301
[...]
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2024-08-29 12:47:17.760 🔵-[TSGeofenceEvent startLoiteringAt:callback:]_block_invoke loiteringDelay timer fired: ChIJ2WEEbYRZwokRDTfV0NcZRnA
2024-08-29 12:47:17.760 🎾-[TSGeofenceManager requestLocation]
2024-08-29 12:47:17.763 ℹ️+[LocationAuthorization run:onCancel:] status: 3
2024-08-29 12:47:17.764 ℹ️-[TSDBLogger db_save] Log committed
2024-08-29 12:47:17.812 🔵-[TSLocationManager onResume:] enabled? 1
2024-08-29 12:47:17.828 ℹ️-[LocationDAO purge:] 1
2024-08-29 12:47:17.830 ℹ️-[TSDBLogger db_save] Log committed
2024-08-29 12:47:17.838
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager fireGeofenceEvent:] 📢DWELL Geofence: ChIJ2WEEbYRZwokRDTfV0NcZRnA
╚═══════════════════════════════════════════════════════════
2024-08-29 12:47:27.772 ✅-[TSGeofenceManager fireGeofenceEvent:] INSERT: C90AAFCA-E2F4-43B5-A724-94A772B16A9D
2024-08-29 12:47:27.772
Re-install with 4.17.0-beta.3
Your deleted post is no longer relevant?
Your deleted post is no longer relevant?
Correct, also wanted to test it in the field before commenting, which I just did, and it works great! Closing this since it's resolved.