Closed stefanminch closed 6 months ago
Maybe the configuration is wrong or the phones are just broken (this happens on few devices). Thank you for the support, great plugin!
Hi @christocracy , Is anyone looking into this?
Do you have a question about your logs?
@christocracy I believe, as per the docs, the issue above is because of the geofencing while stationary on ios devices. However, two issues I see not mentioned are:
Both issues persisting only on iOS.
Would be great help if you could help understand. Thanks
The geofence radius seems to be >1km even if the stationaryRadius is kept at 25m
Geofences are completely handled by the OS. Geofence triggering depends upon the presence of wifi signals in the environment and the spacing and proximity of cell towers.
There is one random point being logged right after the geofence is triggered and
This is not unusual.
Could you suggest a workaround we could apply to eliminate the random point?
On Mon, 30 Oct 2023 at 6:13 PM, Chris Scott @.***> wrote:
The geofence radius seems to be >1km even if the stationaryRadius is kept at 25m
Geofences are completely handled by the OS. Geofence triggering depends upon the presence of wifi signals in the environment and the spacing and proximity of cell towers.
There is one random point being logged right after the geofence is triggered and
This is not unusual.
— Reply to this email directly, view it on GitHub https://github.com/transistorsoft/flutter_background_geolocation/issues/1097#issuecomment-1785082097, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2G4BAEJDZS3A2MLXMHVZVLYB6MQRAVCNFSM6AAAAAA3MCAC26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBVGA4DEMBZG4 . You are receiving this because you commented.Message ID: <transistorsoft/flutter_background_geolocation/issues/1097/1785082097@ github.com>
Analyze the location.coords.accuracy. If the value is > some value you don't like, then throw it away.
Thanks, I'll check it out.
On Mon, 30 Oct 2023 at 6:46 PM, Chris Scott @.***> wrote:
Analyze the location.coords.accuracy. If the value is > some value you don't like, then throw it away.
— Reply to this email directly, view it on GitHub https://github.com/transistorsoft/flutter_background_geolocation/issues/1097#issuecomment-1785146176, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2G4BAAOLV5P2YFAGPY5FUTYB6QKJAVCNFSM6AAAAAA3MCAC26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBVGE2DMMJXGY . You are receiving this because you commented.Message ID: <transistorsoft/flutter_background_geolocation/issues/1097/1785146176@ github.com>
Coming back to the geofence trigger. So my users will be offline for upto 2 weeks. They’ll basically be in the ocean. Does that mean I wont be able to retrieve any points from their trip as I’m assuming the cell towers as you mentioned will not be anywhere near for them?
On Mon, 30 Oct 2023 at 6:13 PM, Chris Scott @.***> wrote:
The geofence radius seems to be >1km even if the stationaryRadius is kept at 25m
Geofences are completely handled by the OS. Geofence triggering depends upon the presence of wifi signals in the environment and the spacing and proximity of cell towers.
There is one random point being logged right after the geofence is triggered and
This is not unusual.
— Reply to this email directly, view it on GitHub https://github.com/transistorsoft/flutter_background_geolocation/issues/1097#issuecomment-1785082097, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2G4BAEJDZS3A2MLXMHVZVLYB6MQRAVCNFSM6AAAAAA3MCAC26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBVGA4DEMBZG4 . You are receiving this because you commented.Message ID: <transistorsoft/flutter_background_geolocation/issues/1097/1785082097@ github.com>
Does that mean I wont be able to retrieve any points from their trip
Likely. The OS does not actively use gps to evaluate geofences. It passively uses only cell towers and wifi routers.
Is this only iOS specific? Or is it same for android?
And also, is there a way for me to programmatically access the device gps over cell towers so that I can solve this?
On Tue, 31 Oct 2023 at 8:24 AM, Chris Scott @.***> wrote:
Does that mean I wont be able to retrieve any points from their trip
Likely. The OS does not actively use gps to evaluate geofences. It passively uses only cell towers and wifi routers.
— Reply to this email directly, view it on GitHub https://github.com/transistorsoft/flutter_background_geolocation/issues/1097#issuecomment-1786345748, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2G4BAAY4NIUB4DGBYMGWC3YCBQFBAVCNFSM6AAAAAA3MCAC26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBWGM2DKNZUHA . You are receiving this because you commented.Message ID: <transistorsoft/flutter_background_geolocation/issues/1097/1786345748@ github.com>
Both
Okay. Thanks for reaching out.
On Tue, 31 Oct 2023 at 8:34 AM, Chris Scott @.***> wrote:
Both
— Reply to this email directly, view it on GitHub https://github.com/transistorsoft/flutter_background_geolocation/issues/1097#issuecomment-1786353484, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2G4BADWCUKSI4VOOZQ6X3LYCBRKVAVCNFSM6AAAAAA3MCAC26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBWGM2TGNBYGQ . You are receiving this because you commented.Message ID: <transistorsoft/flutter_background_geolocation/issues/1097/1786353484@ github.com>
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Your Environment
flutter doctor
): Doctor summary (to see all details, run flutter doctor -v): [!] Flutter (Channel stable, 3.10.0, on macOS 12.5 21G72 darwin-arm64, locale en-BG) ! Warning:dart
on your path resolves to /usr/local/Cellar/dart/2.18.2/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/stefan/Projects/flutter. Consider adding /Users/stefan/Projects/flutter/bin to the front of your path. [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] IntelliJ IDEA Ultimate Edition (version 2020.2.3) [✓] Connected device (3 available) [✓] Network resources! Doctor found issues in 1 category.
Expected Behavior
see screenshot, there are missing points for more than 6 kilometers (~25 minutes)
Actual Behavior
Have location points for that missing part of the route
Steps to Reproduce
Start tracking Stop tracking Have the points tracked
Context
Track my drivers around town
Debug logs
Logs from the plugin, missing block starts at 2023-08-10 22:53:12 and ends at 2023-08-10 23:12:38
``` 2023-08-10 22:46:17.461 ℹ️-[TSLocationManager init] ╔═════════════════════════════════════════════ ║ TSLocationManager (build 388) ╠══════════════════════════════════════════════ { activityRecognitionInterval = 10000; activityType = 1; authorization = { }; autoSync = 1; autoSyncThreshold = 0; batchSync = 0; debug = 0; desiredAccuracy = 10; desiredOdometerAccuracy = 100; didDeviceReboot = 0; didLaunchInBackground = 0; didRequestUpgradeLocationAuthorization = 1; disableAutoSyncOnCellular = 0; disableElasticity = 0; disableLocationAuthorizationAlert = 0; disableMotionActivityUpdates = 0; disableStopDetection = 0; distanceFilter = 250; elasticityMultiplier = 1; enableTimestampMeta = 0; enabled = 1; extras = { }; geofenceInitialTriggerEntry = 1; geofenceProximityRadius = 2000; geofenceTemplate = ""; headers = { "Content-Type" = "application/json"; "authentication-token" = ""; }; heartbeatInterval = 60; httpRootProperty = location; httpTimeout = 60000; iOSHasWarnedLocationServicesOff = 0; isFirstBoot = 0; isMoving = 1; lastLocationAuthorizationStatus = 3; locationAuthorizationAlert = { cancelButton = Cancel; instructions = "To use background location, you must enable '{locationAuthorizationRequest}' in the Location Services settings"; settingsButton = Settings; titleWhenNotEnabled = "Background location is not enabled"; titleWhenOff = "Location services are off"; }; locationAuthorizationRequest = Always; locationTemplate = ""; locationTimeout = 60; locationsOrderDirection = ASC; logLevel = 5; logMaxDays = 3; maxBatchSize = "-1"; maxDaysToPersist = 1; maxRecordsToPersist = "-1"; method = POST; minimumActivityRecognitionConfidence = 70; odometer = "1368422.571045468"; params = { isAvailable = true; }; pausesLocationUpdatesAutomatically = 1; persistMode = 2; preventSuspend = 0; schedule = ( ); schedulerEnabled = 0; showsBackgroundLocationIndicator = 1; startOnBoot = 0; stationaryRadius = 25; stopAfterElapsedMinutes = "-1"; stopDetectionDelay = 0; stopOnStationary = 0; stopOnTerminate = 0; stopTimeout = 5; trackingMode = 1; url = "https://luckydrive.mobi/drivers/background-location"; useSignificantChangesOnly = 0; } 2023-08-10 22:46:17.462 ℹ️-[GeofenceDAO init] CREATE TABLE IF NOT EXISTS geofences (id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL UNIQUE, latitude DOUBLE NOT NULL, sin_latitude DOUBLE NOT NULL, cos_latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, sin_longitude DOUBLE NOT NULL, cos_longitude DOUBLE NOT NULL, radius DOUBLE NOT NULL, notifyOnEntry BOOLEAN NOT NULL DEFAULT 0, notifyOnExit BOOLEAN NOT NULL DEFAULT 0, notifyOnDwell BOOLEAN NOT NULL DEFAULT 0, loiteringDelay DOUBLE NOT NULL DEFAULT 0, extras TEXT) 2023-08-10 22:46:17.462 ℹ️-[GeofenceDAO init] CREATE index IF NOT EXISTS identifier ON geofences (identifier);CREATE index IF NOT EXISTS latitude ON geofences (latitude);CREATE index IF NOT EXISTS longitude ON geofences (longitude);CREATE index IF NOT EXISTS sin_latitude ON geofences (sin_latitude);CREATE index IF NOT EXISTS cos_latitude ON geofences (cos_latitude);CREATE index IF NOT EXISTS sin_longitude ON geofences (sin_longitude);CREATE index IF NOT EXISTS cos_longitude ON geofences (cos_longitude); 2023-08-10 22:46:17.474 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3 2023-08-10 22:46:17.481 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2023-08-10 22:46:17.482 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2023-08-10 22:46:17.482 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3 2023-08-10 22:46:17.486 ℹ️+[LocationAuthorization run:onCancel:] status: 3 2023-08-10 22:46:17.486 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2023-08-10 22:46:17.962 ℹ️-[TSConfig persist] 2023-08-10 22:46:23.265 🔵-[TSLocationManager onSuspend:] enabled? 1) 2023-08-10 22:46:23.276 ℹ️-[TSDBLogger db_save] Log committed 2023-08-10 22:50:10.436 🔵-[TSLocationManager onResume:] enabled? 1 2023-08-10 22:50:10.438 ℹ️-[TSDBLogger db_save] Log committed 2023-08-10 22:50:11.425 ℹ️-[TSConfig persist] 2023-08-10 22:50:11.658 🔵-[TSLocationManager onSuspend:] enabled? 1) 2023-08-10 22:50:11.667 ℹ️-[TSDBLogger db_save] Log committed 2023-08-10 22:51:20.447 🔵-[TSLocationManager onResume:] enabled? 1 2023-08-10 22:51:21.523 🔵-[TSLocationManager onSuspend:] enabled? 1) 2023-08-10 22:51:21.535 ℹ️-[TSDBLogger db_save] Log committed 2023-08-10 22:53:08.452 🔵-[TSLocationManager onResume:] enabled? 1 2023-08-10 22:53:08.460 ℹ️-[TSDBLogger db_save] Log committed 2023-08-10 22:53:09.277 ℹ️-[TSConfig persist] 2023-08-10 22:53:11.113 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS 2023-08-10 22:53:11.122 ✅-[LocationDAO clear]_block_invoke Destroyed all locations 2023-08-10 22:53:11.123 🔵-[TSLocationManager getCurrentPosition:] 2023-08-10 22:53:11.123 🎾-[LocationManager startUpdatingLocation] ON 2023-08-10 22:53:11.148 ℹ️+[LocationAuthorization run:onCancel:] status: 3 2023-08-10 22:53:11.149 📍<+42.68378792,+23.31703926> +/- 4.16m (speed 0.00 mps / course -1.00) @ 10.08.23, 22:51:35 Eastern European Summer Time 2023-08-10 22:53:11.149 ╔═══════════════════════════════════════════════════════════ ║ -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 3 ╚═══════════════════════════════════════════════════════════ 2023-08-10 22:53:11.151 📍<+42.68378792,+23.31703926> +/- 4.16m (speed 0.00 mps / course -1.00) @ 10.08.23, 22:51:45 Eastern European Summer Time 2023-08-10 22:53:11.151 ⚠️-[LocationManager locationManager:didUpdateLocations:]