transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.65k stars 426 forks source link

background location sync on server is not working with android until user turn on the screen #1826

Closed chnauman closed 5 months ago

chnauman commented 1 year ago

Your Environment

Expected Behavior

I want android application to keep sending my server the events about geofence entry and exit. When the screen is off and the app is running in background. Even when the app is terminated

Actual Behavior

The application doesn't trigger an event and inform my server if the screen is off.

Steps to Reproduce

1. 2. 3. 4.

Context

Debug logs

Logs ``` 09-20 07:35:19.314 INFO [LoggerFacade$a a] ╔═════════════════════════════════════════════ ║ TSLocationManager version: 3.4.5 (427) ╠═════════════════════════════════════════════ ╟─ samsung SM-G981U1 @ 13 (react) { "activityRecognitionInterval": 10000, "allowIdenticalLocations": false, "authorization": {}, "autoSync": true, "autoSyncThreshold": 0, "backgroundPermissionRationale": { "title": "Allow TMWYGT to access this device's location even when closed or not in use?", "message": "TMWYGT collects location data to know you reach your marked point to trigger messages", "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"", "negativeAction": "" }, "batchSync": false, "configUrl": "", "debug": false, "deferTime": 0, "desiredAccuracy": -1, "desiredOdometerAccuracy": 100, "disableAutoSyncOnCellular": false, "disableElasticity": false, "disableLocationAuthorizationAlert": false, "disableMotionActivityUpdates": false, "disableProviderChangeRecord": false, "disableStopDetection": false, "distanceFilter": 10, "elasticityMultiplier": 1, "enableHeadless": false, "enableTimestampMeta": false, "extras": {}, "fastestLocationUpdateInterval": -1, "foregroundService": true, "geofenceInitialTriggerEntry": false, "geofenceModeHighAccuracy": false, "geofenceProximityRadius": 1000, "geofenceTemplate": "", "headers": { "Content-Type": "application\/json", "Accept": "application\/json", "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5OGI2MDYzOS1hN2M0LTQzYjItOTUxNC03MmQ4NjBhZGFjNzMiLCJqdGkiOiI5MDYwMTRiMDExMjZiMDI5YWI5YzUzNmY4OTA4OGJkMDY4ZWYxOWMyYTA0ZThjNjUyMzY0NDQ3ZDc1NzRkZTIzYWIwNjdlMjZlZWY3OGM1YiIsImlhdCI6MTY5NTExOTU0Ni4xMTMxNzgsIm5iZiI6MTY5NTExOTU0Ni4xMTMxODEsImV4cCI6MTcyNjc0MTk0Ni4xMDA2NzgsInN1YiI6IjIiLCJzY29wZXMiOlsiKiJdfQ.aMGWlibrGz6OH0uj4Rf3x_oP3jgfwqZcR3XFftr5ghRxwM_n5rzrp4f942Rk6pllOq2OIYZLq7vVBjYpWFcsW5tyJq0Kx0IWkJbAMCvWr39Qqu6eYKgL4CIBOQ5XI0aFoTvMhF94YklS7TN1pTUZEusBtl5r7x6_dad_6u6GNZuCRHZqu8ByIP_qywR58ADrREqztwIpaApz1g_cXKZVVMvReuxowpe6HG0jW-QOKqJU85nNI8-vVF8nf7H90S5jSTXRwUTb9O2GIBoCw4MJ_e0o4-aaauu1Km09BpBNa8ER1L8Dvt6-bsZ1lszj7jaB68547O4diVrU4h3CGmnD25eWPIeKIWMeBxFiP5ATuEuNF5-Bcxoh38wcPBSZcASXGZm33gnuB3EbEPsHjAma7gWmck3M47Gr8fr4zRcEWuBbN-sU5eSw2cWBnClzHbahYImmaqn3iZ6FvACKUk0gcKBK-Ouem4v02VriABRGFqJFu4CnroI0P-KfDRNO310uGb3QPZYF0kwfnMNZY5VMwF59DxVys4dsyCKa0GXiFUSSMQtaRXb1mblEJS6GAd7inMi7pNaNRGRleigOdCeu_wl8aHqn47bnSMjk74c-GGlzEwU-EJeUfzJ8dT7IjrD5EGqBRZY3WpIqVhFxPrd6RhUMlt_83MTjTxJeuQ9XPTg" }, "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask", "heartbeatInterval": -1, "httpRootProperty": "location", "httpTimeout": 60000, "isMoving": false, "locationAuthorizationRequest": "Always", "locationTemplate": "", "locationTimeout": 60, "locationUpdateInterval": 1000, "locationsOrderDirection": "ASC", "logLevel": 5, "logMaxDays": 3, "maxBatchSize": -1, "maxDaysToPersist": 1, "maxRecordsToPersist": -1, "method": "POST", "minimumActivityRecognitionConfidence": 75, "motionTriggerDelay": 0, "notification": { "layout": "", "title": "TMWYGT", "text": "Geofence Activated", "color": "", "channelName": "TSLocationManager", "channelId": "", "smallIcon": "", "largeIcon": "", "priority": -1, "sticky": false, "strings": {}, "actions": [] }, "params": { "test_param": "This is my test parameter" }, "persist": true, "persistMode": 2, "schedule": [], "scheduleUseAlarmManager": false, "speedJumpFilter": 300, "startOnBoot": true, "stationaryRadius": 25, "stopAfterElapsedMinutes": 0, "stopOnStationary": false, "stopOnTerminate": false, "stopTimeout": 5, "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking", "url": "https:\/\/www.tmwygt.com\/api\/v1\/bg-geolocation", "useSignificantChangesOnly": false, "enabled": true, "schedulerEnabled": false, "trackingMode": 1, "odometer": 2886.476318359375, "isFirstBoot": false, "didLaunchInBackground": false, "didDeviceReboot": false } 09-20 07:35:19.314 DEBUG [HttpService startMonitoringConnectivityChanges] 🎾 Start monitoring connectivity changes 09-20 07:35:19.315 INFO [LoggerFacade$a a] ╔═════════════════════════════════════════════ ║ DEVICE SENSORS ╠═════════════════════════════════════════════ ╟─ ✅ ACCELEROMETER: {Sensor name="LSM6DSO Accelerometer", vendor="STMicro", version=15932, type=1, maxRange=78.4532, resolution=0.0023928226, power=0.17, minDelay=5000} ╟─ ✅ GYROSCOPE: {Sensor name="LSM6DSO Gyroscope", vendor="STMicro", version=15932, type=4, maxRange=17.452517, resolution=6.1084726E-4, power=0.55, minDelay=5000} ╟─ ✅ MAGNETOMETER: {Sensor name="AK09918 Magnetometer", vendor="akm", version=146952, type=2, maxRange=4912.0503, resolution=0.15, power=1.1, minDelay=10000} ╟─ ✅ SIGNIFICANT_MOTION: {Sensor name="smd Wakeup", vendor="Samsung", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1} ╚═════════════════════════════════════════════ 09-20 07:35:19.315 DEBUG [LoggerFacade$a a] 🎾 START [GeofencingService startId: 1, eventCount: 1] 09-20 07:35:19.315 DEBUG [TSLocationManager b] ℹ️ Load last odometer location: Location[TSLocationManager 32.583437,74.089776 hAcc=16.521 et=0 {Bundle[{odometer=2886.4763}]}] 09-20 07:35:19.316 DEBUG [LoggerFacade$a a] 🎾 START [GeofencingService startId: 2, eventCount: 2] 09-20 07:35:19.316 INFO [LoggerFacade$a a] ✅ Google Play Services: connected (version code:12451000) 09-20 07:35:19.316 DEBUG [LoggerFacade$a a] ☯️ onCreate 09-20 07:35:19.320 DEBUG [TSSQLiteAppender$c run] ℹ️ Cleared logs older than 72 hours 09-20 07:35:19.321 INFO [TSGeofenceManager start] 🎾 Start monitoring geofences 09-20 07:35:19.328 INFO [TSProviderManager startMonitoring] 🎾 Start monitoring location-provider changes 09-20 07:35:19.334 DEBUG [SQLiteLocationDAO prune] ℹ️ PRUNE -1 days 09-20 07:35:19.334 DEBUG [TSGeofenceManager$f run] ╔═════════════════════════════════════════════ ║ TSGeofenceManager monitoring 2/2 ╠═════════════════════════════════════════════ ╟─ 🎾 identifier_12 ╟─ 🎾 identifier_425277 ╚═════════════════════════════════════════════ 09-20 07:35:19.335 DEBUG [HttpService a] ╔═════════════════════════════════════════════ ║ 📶 Connectivity change: connected? true ╠═════════════════════════════════════════════ 09-20 07:35:19.337 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [isMoving] 09-20 07:35:19.339 INFO [HeartbeatService stop] 🔴 Stop heartbeat 09-20 07:35:19.342 INFO [TrackingService changePace] 🔵 setPace: false → true 09-20 07:35:19.342 INFO [GeofencingService b] ╔═════════════════════════════════════════════ ║ GeofencingService: Stationary geofence EXIT ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.582604,74.085508 hAcc=28.283 et=+4d11h30m14s66ms alt=189.0 vAcc=3.4795191] 09-20 07:35:19.343 DEBUG [AbstractService a] ⚙️︎ FINISH [GeofencingService startId: 2, eventCount: 1, sticky: false] 09-20 07:35:19.348 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 1, eventCount: 1] 09-20 07:35:19.349 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: true ╠═════════════════════════════════════════════ 09-20 07:35:19.349 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 1, eventCount: 0, sticky: true] 09-20 07:35:19.358 DEBUG [LifecycleManager b] ╔═════════════════════════════════════════════ ║ ☯️ HeadlessMode? true ╠═════════════════════════════════════════════ 09-20 07:35:19.368 INFO [GeofencingService a] ╔═════════════════════════════════════════════ ║ Geofencing Event: EXIT ╠═════════════════════════════════════════════ ╟─ identifier_12 ╚═════════════════════════════════════════════ 09-20 07:35:19.369 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: true | timerExpired: false | elapsed: 0 09-20 07:35:19.373 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 1 (672ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.582837,74.085720 hAcc=104.1 et=+4d11h30m15s165ms alt=189.09999084472656 vAcc=9.826241 vel=1.0579491 bear=37.403286], time: 1695177318700 09-20 07:35:19.374 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: false | timerExpired: false | elapsed: 1099 09-20 07:35:19.374 DEBUG [TSLocationManager a] Median accuracy: 104.1 09-20 07:35:19.382 DEBUG [LocationAuthorization withPermission] ℹ️ LocationAuthorization: Permission granted 09-20 07:35:19.393 INFO [SQLiteLocationDAO persist] ✅ INSERT: 41846aae-403e-403a-9f15-878de2a3157c 09-20 07:35:19.393 DEBUG [AbstractService a] 🎾 START [LocationRequestService startId: 1, eventCount: 1] 09-20 07:35:19.393 INFO [SingleLocationRequest startUpdatingLocation] 🔵 [SingleLocationRequest start, action: 1, requestId: 1] 09-20 07:35:19.394 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 1) ╠═════════════════════════════════════════════ 09-20 07:35:19.396 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: true] 09-20 07:35:19.401 DEBUG [AbstractService a] ⚙️︎ FINISH [GeofencingService startId: 1, eventCount: 0, sticky: false] 09-20 07:35:19.458 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 1 09-20 07:35:19.460 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 07:35:19.460 INFO [HttpService a] 🔵 HTTP POST: 41846aae-403e-403a-9f15-878de2a3157c 09-20 07:35:19.608 DEBUG [AbstractService f] ⚙️︎ GeofencingService.stopSelfResult(2): true 09-20 07:35:19.609 DEBUG [AbstractService onDestroy] 🔴 GeofencingService stopped 09-20 07:35:20.338 INFO [HttpService flush] ℹ️ HttpService is busy 09-20 07:35:21.315 DEBUG [AbstractService a] 🎾 START [LocationRequestService startId: 2, eventCount: 1] 09-20 07:35:21.317 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 1 (55ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.582731,74.085605 hAcc=11.639 et=+4d11h30m17s726ms alt=189.09999084472656 vAcc=9.959123 vel=1.2225925 sAcc=0.2624881 bear=225.25429], time: 1695177321261 09-20 07:35:21.318 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: false | timerExpired: false | elapsed: 3660 09-20 07:35:21.318 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: true 09-20 07:35:21.319 DEBUG [TSLocationManager a] Median accuracy: 57.8695 09-20 07:35:21.326 INFO [TSLocationManager requestLocationUpdates] 🎾 Location-services: ON 09-20 07:35:21.326 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 09-20 07:35:21.327 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: false | timerExpired: false | elapsed: 3660 09-20 07:35:21.328 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: false] 09-20 07:35:21.329 INFO [SQLiteLocationDAO persist] ✅ INSERT: fb2c4b04-38a3-44ce-8dd7-e571b1f0a596 09-20 07:35:21.330 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 09-20 07:35:21.332 INFO [HttpService flush] ℹ️ HttpService is busy 09-20 07:35:21.339 DEBUG [AbstractService b] 🎾 STOP [LocationRequestService startId: 3, eventCount: 1] 09-20 07:35:21.339 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 3, eventCount: 0, sticky: false] 09-20 07:35:21.354 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 2, eventCount: 1] 09-20 07:35:21.354 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: false | timerExpired: false | elapsed: 3660 09-20 07:35:21.355 DEBUG [TrackingService c] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.582731,74.085605 hAcc=11.639 et=+4d11h30m17s726ms alt=189.09999084472656 vAcc=9.959123 vel=1.2225925 sAcc=0.2624881 bear=225.25429] ╟─ Age: 93ms, time: 1695177321261 09-20 07:35:21.355 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 2, eventCount: 0, sticky: true] 09-20 07:35:21.355 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 09-20 07:35:21.355 DEBUG [TSLocationManager onLocationResult] ℹ️ IGNORED: same as last location 09-20 07:35:21.547 DEBUG [AbstractService f] ⚙️︎ LocationRequestService.stopSelfResult(3): true 09-20 07:35:21.548 DEBUG [AbstractService onDestroy] 🔴 LocationRequestService stopped 09-20 07:35:22.210 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 07:35:22.212 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: 41846aae-403e-403a-9f15-878de2a3157c 09-20 07:35:22.220 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 07:35:22.220 INFO [HttpService a] 🔵 HTTP POST: fb2c4b04-38a3-44ce-8dd7-e571b1f0a596 09-20 07:35:22.636 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 07:35:22.639 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: fb2c4b04-38a3-44ce-8dd7-e571b1f0a596 09-20 07:35:22.645 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 1 09-20 07:35:26.446 DEBUG [AbstractService a] 🎾 START [ActivityRecognitionService startId: 1, eventCount: 1] 09-20 07:35:26.456 DEBUG [ActivityRecognitionService a] 🚘 ️DetectedActivity [type=STILL, confidence=99] 09-20 07:35:26.461 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 3, eventCount: 1] 09-20 07:35:26.461 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false] 09-20 07:35:26.462 INFO [TSScheduleManager oneShot] ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116) 09-20 07:35:26.465 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 3, eventCount: 0, sticky: true] 09-20 07:35:26.485 DEBUG [AbstractService a] 🎾 START [ActivityRecognitionService startId: 2, eventCount: 1] 09-20 07:35:26.487 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true 09-20 07:35:26.488 INFO [HeartbeatService stop] 🔴 Stop heartbeat 09-20 07:35:26.491 INFO [TrackingService changePace] 🔵 setPace: true → true 09-20 07:35:26.491 INFO [ActivityRecognitionService a] ╔═════════════════════════════════════════════ ║ Motion Transition Result ╠═════════════════════════════════════════════ ╟─ 🎾 ENTER: still ╚═════════════════════════════════════════════ 09-20 07:35:26.491 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false] 09-20 07:35:26.494 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 4, eventCount: 1] 09-20 07:35:26.494 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: true ╠═════════════════════════════════════════════ 09-20 07:35:26.494 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 4, eventCount: 0, sticky: true] 09-20 07:35:26.498 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 2 (234ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.582714,74.085590 hAcc=4.98 et=+4d11h30m22s728ms alt=188.6999969482422 vAcc=4.2860627 vel=0.28631997 sAcc=0.086023256 bear=180.60954], time: 1695177326263 09-20 07:35:26.500 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: false | timerExpired: false | elapsed: 8662 09-20 07:35:26.500 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: true 09-20 07:35:26.503 DEBUG [TSLocationManager a] Median accuracy: 11.639 09-20 07:35:26.507 INFO [TSLocationManager d] 🔴 Location-services: OFF 09-20 07:35:26.508 INFO [TSLocationManager requestLocationUpdates] 🎾 Location-services: ON 09-20 07:35:26.508 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 09-20 07:35:26.509 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 09-20 07:35:26.513 INFO [SQLiteLocationDAO persist] ✅ INSERT: fef0b209-be7e-42d0-978e-ddcc2290e76c 09-20 07:35:26.514 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 1) ╠═════════════════════════════════════════════ 09-20 07:35:26.553 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 5, eventCount: 1] 09-20 07:35:26.554 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: false | timerExpired: false | elapsed: 8920 09-20 07:35:26.554 DEBUG [TrackingService c] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.582714,74.085590 hAcc=4.98 et=+4d11h30m22s986ms alt=188.6999969482422 vAcc=4.2860627] ╟─ Age: 32ms, time: 1695177326521 09-20 07:35:26.554 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 09-20 07:35:26.555 DEBUG [TSLocationManager a] Median accuracy: 8.3095 09-20 07:35:26.555 INFO [TrackingService b] ℹ️ Distance from stoppedAtLocation: -14.251904 09-20 07:35:26.555 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 5, eventCount: 0, sticky: true] 09-20 07:35:26.560 INFO [SQLiteLocationDAO persist] ✅ INSERT: 1bbae9c6-10f4-4b4c-a638-6873f5961f54 09-20 07:35:26.561 INFO [HttpService flush] ℹ️ HttpService is busy 09-20 07:35:26.566 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 2 09-20 07:35:26.575 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 07:35:26.575 INFO [HttpService a] 🔵 HTTP POST: fef0b209-be7e-42d0-978e-ddcc2290e76c 09-20 07:35:26.694 DEBUG [AbstractService f] ⚙️︎ ActivityRecognitionService.stopSelfResult(2): true 09-20 07:35:26.695 DEBUG [AbstractService onDestroy] 🔴 ActivityRecognitionService stopped 09-20 07:35:27.059 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 07:35:27.061 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: fef0b209-be7e-42d0-978e-ddcc2290e76c 09-20 07:35:27.068 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 07:35:27.068 INFO [HttpService a] 🔵 HTTP POST: 1bbae9c6-10f4-4b4c-a638-6873f5961f54 09-20 07:35:27.448 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 07:35:27.454 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: 1bbae9c6-10f4-4b4c-a638-6873f5961f54 09-20 07:35:27.457 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 2 09-20 07:35:31.590 DEBUG [AbstractService a] 🎾 START [ActivityRecognitionService startId: 1, eventCount: 1] 09-20 07:35:31.592 DEBUG [ActivityRecognitionService a] 🚘 ️DetectedActivity [type=STILL, confidence=99] 09-20 07:35:31.598 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false] 09-20 07:35:31.661 DEBUG [AbstractService a] 🎾 START [ActivityRecognitionService startId: 2, eventCount: 1] 09-20 07:35:31.665 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true 09-20 07:35:31.669 INFO [ActivityRecognitionService a] ╔═════════════════════════════════════════════ ║ Motion Transition Result ╠═════════════════════════════════════════════ ╟─ 🎾 ENTER: still ╚═════════════════════════════════════════════ 09-20 07:35:31.669 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false] 09-20 07:35:31.677 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 6, eventCount: 1] 09-20 07:35:31.678 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 6, eventCount: 0, sticky: true] 09-20 07:35:31.878 DEBUG [AbstractService f] ⚙️︎ ActivityRecognitionService.stopSelfResult(2): true 09-20 07:35:31.880 DEBUG [AbstractService onDestroy] 🔴 ActivityRecognitionService stopped 09-20 07:40:26.487 INFO [ScheduleEvent a] ╔═════════════════════════════════════════════ ║ ⏰ OneShot event fired: STOP_TIMEOUT ╠═════════════════════════════════════════════ 09-20 07:40:26.493 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [isMoving] 09-20 07:40:26.501 INFO [HeartbeatService stop] 🔴 Stop heartbeat 09-20 07:40:26.504 INFO [TSLocationManager d] 🔴 Location-services: OFF 09-20 07:40:26.506 INFO [TrackingService changePace] 🔵 setPace: true → false 09-20 07:40:26.530 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 3 (234ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.582685,74.085578 hAcc=5.021 et=+4d11h35m22s755ms alt=188.6999969482422 vAcc=2.536039 vel=0.014299036 sAcc=0.086023256], time: 1695177626290 09-20 07:40:26.545 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: false 09-20 07:40:26.548 DEBUG [TSLocationManager a] Median accuracy: 5.021 09-20 07:40:26.564 INFO [SQLiteLocationDAO persist] ✅ INSERT: a312c9d1-2c3f-4194-a73c-cd84891690db 09-20 07:40:26.564 DEBUG [TSGeofenceManager startMonitoringStationaryRegion] 🎾 Start monitoring stationary region (radius: 150.0m 32.5826852,74.0855784 hAcc=5.021) 09-20 07:40:26.575 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 1) ╠═════════════════════════════════════════════ 09-20 07:40:26.608 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 7, eventCount: 1] 09-20 07:40:26.609 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: false ╠═════════════════════════════════════════════ 09-20 07:40:26.613 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 7, eventCount: 0, sticky: false] 09-20 07:40:26.654 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 3 09-20 07:40:26.660 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 07:40:26.660 INFO [HttpService a] 🔵 HTTP POST: a312c9d1-2c3f-4194-a73c-cd84891690db 09-20 07:40:26.821 DEBUG [AbstractService f] ⚙️︎ TrackingService.stopSelfResult(7): true 09-20 07:40:26.822 DEBUG [AbstractService onDestroy] 🔴 TrackingService stopped 09-20 07:40:28.823 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 07:40:28.824 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: a312c9d1-2c3f-4194-a73c-cd84891690db 09-20 07:40:28.828 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 3 09-20 08:06:38.066 DEBUG [LifecycleManager onStart] ☯️ onStart 09-20 08:06:38.069 DEBUG [LifecycleManager onResume] ☯️ onResume 09-20 08:06:38.070 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 0) ╠═════════════════════════════════════════════ 09-20 08:06:39.986 DEBUG [TSGeofenceManager$f run] ╔═════════════════════════════════════════════ ║ TSGeofenceManager monitoring 2/2 ╠═════════════════════════════════════════════ ╟─ 🎾 identifier_12 ╟─ 🎾 identifier_425277 ╚═════════════════════════════════════════════ 09-20 08:06:39.987 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, desiredAccuracy, extras, geofenceInitialTriggerEntry, headers, headlessJobService, logLevel, notification, notification.title, notification.text, params, schedule, startOnBoot, stopOnTerminate, url] 09-20 08:06:39.999 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 0) ╠═════════════════════════════════════════════ 09-20 08:06:39.999 DEBUG [LocationAuthorization withBackgroundPermission] ℹ️ LocationAuthorization: Permission granted 09-20 08:06:40.002 DEBUG [HttpService startMonitoringConnectivityChanges] 🎾 Start monitoring connectivity changes 09-20 08:06:40.004 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 🎾 Start monitoring powersave changes 09-20 08:06:40.008 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 09-20 08:06:40.010 INFO [HeartbeatService stop] 🔴 Stop heartbeat 09-20 08:06:40.037 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 4 (1212117ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.582522,74.085552 hAcc=19.853 et=+4d11h41m24s384ms alt=188.6999969482422 vAcc=2.5111654], time: 1695177987919 09-20 08:06:40.037 DEBUG [TSLocationManager a] Median accuracy: 8.33 09-20 08:06:40.041 DEBUG [LocationAuthorization withPermission] ℹ️ LocationAuthorization: Permission granted 09-20 08:06:40.071 DEBUG [AbstractService a] 🎾 START [LocationRequestService startId: 1, eventCount: 1] 09-20 08:06:40.071 INFO [SingleLocationRequest startUpdatingLocation] 🔵 [SingleLocationRequest start, action: 1, requestId: 4] 09-20 08:06:40.072 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: true] 09-20 08:06:40.125 DEBUG [AbstractService a] 🎾 START [GeofencingService startId: 1, eventCount: 1] 09-20 08:06:40.128 DEBUG [AbstractService a] 🎾 START [LocationRequestService startId: 2, eventCount: 1] 09-20 08:06:40.129 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 4 (2492ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.583430,74.089776 hAcc=14.057 et=+4d12h1m34s102ms alt=192.29998779296875 vAcc=1.2295219 vel=0.060369316], time: 1695179197637 09-20 08:06:40.131 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: false 09-20 08:06:40.132 DEBUG [TSLocationManager a] Median accuracy: 11.639 09-20 08:06:40.132 DEBUG [TSLocationManager c] Odometer: 3285.6582 09-20 08:06:40.136 DEBUG [AbstractService a] 🎾 START [GeofencingService startId: 2, eventCount: 2] 09-20 08:06:40.138 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [isMoving] 09-20 08:06:40.139 INFO [HeartbeatService stop] 🔴 Stop heartbeat 09-20 08:06:40.139 DEBUG [TSGeofenceManager stopMonitoringStationaryRegion] 🔴 Stop monitoring stationary region 09-20 08:06:40.142 INFO [TrackingService changePace] 🔵 setPace: false → true 09-20 08:06:40.142 DEBUG [AbstractService a] ⚙️︎ FINISH [GeofencingService startId: 2, eventCount: 1, sticky: false] 09-20 08:06:40.142 INFO [GeofencingService b] ╔═════════════════════════════════════════════ ║ GeofencingService: Stationary geofence EXIT ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.583426,74.089772 hAcc=14.454 et=+4d12h1m32s987ms alt=192.29998779296875 vAcc=1.5253525] 09-20 08:06:40.144 INFO [TSLocationManager requestLocationUpdates] 🎾 Location-services: ON 09-20 08:06:40.145 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 09-20 08:06:40.145 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: false] 09-20 08:06:40.148 INFO [GeofencingService a] ╔═════════════════════════════════════════════ ║ Geofencing Event: ENTER ╠═════════════════════════════════════════════ ╟─ identifier_12 ╚═════════════════════════════════════════════ 09-20 08:06:40.152 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 1, eventCount: 1] 09-20 08:06:40.152 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: true ╠═════════════════════════════════════════════ 09-20 08:06:40.153 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 1, eventCount: 0, sticky: true] 09-20 08:06:40.170 INFO [SQLiteLocationDAO persist] ✅ INSERT: 92183c65-44e7-4a1d-a769-cdeeeac68046 09-20 08:06:40.183 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 1) ╠═════════════════════════════════════════════ 09-20 08:06:40.186 DEBUG [AbstractService a] ⚙️︎ FINISH [GeofencingService startId: 1, eventCount: 0, sticky: false] 09-20 08:06:40.194 DEBUG [AbstractService b] 🎾 STOP [LocationRequestService startId: 3, eventCount: 1] 09-20 08:06:40.194 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 3, eventCount: 0, sticky: false] 09-20 08:06:40.228 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 5 (2590ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.583430,74.089776 hAcc=14.057 et=+4d12h1m34s102ms alt=192.29998779296875 vAcc=1.2295219 vel=0.060369316], time: 1695179197637 09-20 08:06:40.234 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: true 09-20 08:06:40.234 DEBUG [TSLocationManager a] Median accuracy: 12.848 09-20 08:06:40.238 INFO [TSLocationManager d] 🔴 Location-services: OFF 09-20 08:06:40.240 INFO [TSLocationManager requestLocationUpdates] 🎾 Location-services: ON 09-20 08:06:40.240 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 09-20 08:06:40.246 INFO [SQLiteLocationDAO persist] ✅ INSERT: 3e501c8e-86c7-4de0-b64e-d0abd9aa20b8 09-20 08:06:40.247 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 2, eventCount: 1] 09-20 08:06:40.248 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: true ╠═════════════════════════════════════════════ 09-20 08:06:40.248 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 2, eventCount: 0, sticky: true] 09-20 08:06:40.249 INFO [HttpService flush] ℹ️ HttpService is busy 09-20 08:06:40.354 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 09-20 08:06:40.361 INFO [TSScheduleManager oneShot] ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588) 09-20 08:06:40.392 DEBUG [TSLocationManagerActivity a] locationsettings 09-20 08:06:40.392 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 09-20 08:06:40.409 DEBUG [AbstractService b] 🎾 STOP [LocationRequestService startId: 4, eventCount: 1] 09-20 08:06:40.409 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 4, eventCount: 0, sticky: false] 09-20 08:06:40.410 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 4 09-20 08:06:40.432 DEBUG [AbstractService f] ⚙️︎ GeofencingService.stopSelfResult(2): true 09-20 08:06:40.433 DEBUG [TSLocationManagerActivity c] eventCount: 0 09-20 08:06:40.457 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 08:06:40.458 INFO [HttpService a] 🔵 HTTP POST: 92183c65-44e7-4a1d-a769-cdeeeac68046 09-20 08:06:40.463 DEBUG [AbstractService onDestroy] 🔴 GeofencingService stopped 09-20 08:06:40.596 DEBUG [TSLocationManagerActivity onDestroy] 09-20 08:06:40.625 DEBUG [AbstractService f] ⚙️︎ LocationRequestService.stopSelfResult(4): true 09-20 08:06:40.640 DEBUG [AbstractService onDestroy] 🔴 LocationRequestService stopped 09-20 08:06:41.419 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 3, eventCount: 1] 09-20 08:06:41.420 DEBUG [TrackingService c] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.583430,74.089777 hAcc=16.038 et=+4d12h1m37s756ms alt=192.29998779296875 vAcc=1.3416853 vel=0.025868816] ╟─ Age: 129ms, time: 1695179201291 09-20 08:06:41.421 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 3, eventCount: 0, sticky: true] 09-20 08:06:41.422 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 09-20 08:06:41.423 DEBUG [TSLocationManager a] Median accuracy: 14.057 09-20 08:06:41.463 INFO [SQLiteLocationDAO persist] ✅ INSERT: 6418cc15-b315-413d-be3c-fe4132fe7434 09-20 08:06:41.464 INFO [HttpService flush] ℹ️ HttpService is busy 09-20 08:06:41.599 WARN [RNBackgroundGeolocationModule ready] ⚠️ #ready already called. Redirecting to #setConfig 09-20 08:06:41.600 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [headers, params] 09-20 08:06:41.607 INFO [HttpService flush] ℹ️ HttpService is busy 09-20 08:06:43.153 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 08:06:43.154 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: 92183c65-44e7-4a1d-a769-cdeeeac68046 09-20 08:06:43.168 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 08:06:43.168 INFO [HttpService a] 🔵 HTTP POST: 3e501c8e-86c7-4de0-b64e-d0abd9aa20b8 09-20 08:06:43.210 DEBUG [TSGeofenceManager b] ℹ️ GeofencingClient removeGeofences SUCCESS 09-20 08:06:43.210 DEBUG [TSGeofenceManager c] ℹ️ Persist monitored geofences: [] 09-20 08:06:43.212 INFO [GeofenceDAO destroyAll] ✅ 09-20 08:06:43.213 DEBUG [TSGeofenceManager$f run] ╔═════════════════════════════════════════════ ║ TSGeofenceManager monitoring 0/0 ╠═════════════════════════════════════════════ ╚═════════════════════════════════════════════ 09-20 08:06:43.218 INFO [GeofenceDAO create] ✅ identifier_12 09-20 08:06:43.219 DEBUG [LocationAuthorization withBackgroundPermission] ℹ️ LocationAuthorization: Permission granted 09-20 08:06:43.220 INFO [GeofenceDAO create] ✅ identifier_425277 09-20 08:06:43.221 DEBUG [HttpService startMonitoringConnectivityChanges] 🎾 Start monitoring connectivity changes 09-20 08:06:43.221 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 🎾 Start monitoring powersave changes 09-20 08:06:43.221 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 09-20 08:06:43.237 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 6 (684ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.583432,74.089778 hAcc=17.886 et=+4d12h1m39s18ms alt=192.29998779296875 vAcc=1.2910863 vel=0.09679878], time: 1695179202553 09-20 08:06:43.238 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: false | timerExpired: false | elapsed: 4916 09-20 08:06:43.238 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: true 09-20 08:06:43.238 DEBUG [TSLocationManager a] Median accuracy: 14.057 09-20 08:06:43.241 INFO [TSLocationManager d] 🔴 Location-services: OFF 09-20 08:06:43.241 INFO [TSLocationManager requestLocationUpdates] 🎾 Location-services: ON 09-20 08:06:43.242 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 09-20 08:06:43.245 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 09-20 08:06:43.254 DEBUG [TSGeofenceManager$f a] ℹ️ GeofencingClient addGeofences SUCCESS 09-20 08:06:43.254 DEBUG [TSGeofenceManager c] ℹ️ Persist monitored geofences: [identifier_12, identifier_425277] 09-20 08:06:43.254 DEBUG [TSGeofenceManager$f a] ╔═════════════════════════════════════════════ ║ TSGeofenceManager monitoring 2/2 ╠═════════════════════════════════════════════ ╟─ 🎾 identifier_12 ╟─ 🎾 identifier_425277 ╚═════════════════════════════════════════════ 09-20 08:06:43.292 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 4, eventCount: 1] 09-20 08:06:43.293 DEBUG [TSGeofenceManager setLocation] isMoving: true | stateChanged: false | timerExpired: false | elapsed: 5616 09-20 08:06:43.293 DEBUG [TrackingService c] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.583432,74.089778 hAcc=17.886 et=+4d12h1m39s718ms alt=192.29998779296875 vAcc=1.2910863] ╟─ Age: 39ms, time: 1695179203253 09-20 08:06:43.293 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 09-20 08:06:43.294 DEBUG [TSLocationManager a] Median accuracy: 14.057 09-20 08:06:43.294 INFO [TSScheduleManager oneShot] ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116) 09-20 08:06:43.296 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 4, eventCount: 0, sticky: true] 09-20 08:06:43.298 INFO [SQLiteLocationDAO persist] ✅ INSERT: b95bbfdd-00b9-4f17-be38-8b6ca8f96a15 09-20 08:06:43.299 DEBUG [TSGeofenceManager$f a] ℹ️ GeofencingClient addGeofences SUCCESS 09-20 08:06:43.299 DEBUG [TSGeofenceManager c] ℹ️ Persist monitored geofences: [identifier_12, identifier_425277] 09-20 08:06:43.299 DEBUG [TSGeofenceManager$f a] ╔═════════════════════════════════════════════ ║ TSGeofenceManager monitoring 2/2 ╠═════════════════════════════════════════════ ╟─ 🎾 identifier_12 ╟─ 🎾 identifier_425277 ╚═════════════════════════════════════════════ 09-20 08:06:43.299 INFO [HttpService flush] ℹ️ HttpService is busy 09-20 08:06:43.360 DEBUG [AbstractService a] 🎾 START [ActivityRecognitionService startId: 1, eventCount: 1] 09-20 08:06:43.361 DEBUG [ActivityRecognitionService a] 🚘 ️DetectedActivity [type=UNKNOWN, confidence=40] 09-20 08:06:43.364 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false] 09-20 08:06:43.392 DEBUG [AbstractService a] 🎾 START [ActivityRecognitionService startId: 2, eventCount: 1] 09-20 08:06:43.392 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true 09-20 08:06:43.394 INFO [ActivityRecognitionService a] ╔═════════════════════════════════════════════ ║ Motion Transition Result ╠═════════════════════════════════════════════ ╟─ 🎾 ENTER: still ╚═════════════════════════════════════════════ 09-20 08:06:43.394 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false] 09-20 08:06:43.396 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 5, eventCount: 1] 09-20 08:06:43.396 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 5, eventCount: 0, sticky: true] 09-20 08:06:43.433 INFO [TSScheduleManager oneShot] ⏰ Oneshot TERMINATE_EVENT is already pending 09-20 08:06:43.449 DEBUG [TSLocationManagerActivity a] locationsettings 09-20 08:06:43.450 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 09-20 08:06:43.479 DEBUG [TSLocationManagerActivity c] eventCount: 0 09-20 08:06:43.535 DEBUG [TSLocationManagerActivity onDestroy] 09-20 08:06:43.550 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 08:06:43.551 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: 3e501c8e-86c7-4de0-b64e-d0abd9aa20b8 09-20 08:06:43.553 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 08:06:43.553 INFO [HttpService a] 🔵 HTTP POST: 6418cc15-b315-413d-be3c-fe4132fe7434 09-20 08:06:43.602 DEBUG [AbstractService f] ⚙️︎ ActivityRecognitionService.stopSelfResult(2): true 09-20 08:06:43.613 DEBUG [AbstractService onDestroy] 🔴 ActivityRecognitionService stopped 09-20 08:06:44.123 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 08:06:44.130 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: 6418cc15-b315-413d-be3c-fe4132fe7434 09-20 08:06:44.134 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 08:06:44.134 INFO [HttpService a] 🔵 HTTP POST: b95bbfdd-00b9-4f17-be38-8b6ca8f96a15 09-20 08:06:44.239 INFO [TSScheduleManager cancelOneShot] ⏰ Cancel OneShot: STOP_TIMEOUT 09-20 08:06:44.241 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [isMoving] 09-20 08:06:44.245 INFO [TSLocationManager d] 🔴 Location-services: OFF 09-20 08:06:44.245 DEBUG [TSLocationManager a] ℹ️ Clear last odometer location 09-20 08:06:44.247 INFO [ActivityRecognitionService stop] 🔴 Stop motion-activity updates 09-20 08:06:44.247 DEBUG [TSGeofenceManager c] 🔴 Stop monitoring geofences 09-20 08:06:44.247 INFO [HeartbeatService stop] 🔴 Stop heartbeat 09-20 08:06:44.248 DEBUG [HttpService stopMonitoringConnectivityChanges] 🔴 Stop monitoring connectivity changes 09-20 08:06:44.249 DEBUG [DeviceSettings stopMonitoringPowerSaveChanges] 🔴 Stop monitoring powersave changes 09-20 08:06:44.274 DEBUG [AbstractService b] 🎾 STOP [TrackingService startId: 6, eventCount: 1] 09-20 08:06:44.274 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 6, eventCount: 0, sticky: false] 09-20 08:06:44.281 DEBUG [TSGeofenceManager b] ℹ️ GeofencingClient removeGeofences SUCCESS 09-20 08:06:44.282 DEBUG [TSGeofenceManager c] ℹ️ Persist monitored geofences: [] 09-20 08:06:44.283 INFO [GeofenceDAO destroyAll] ✅ 09-20 08:06:44.284 DEBUG [TSGeofenceManager a] ℹ️ GeofencingClient removeGeofences SUCCESS 09-20 08:06:44.284 DEBUG [TSGeofenceManager c] ℹ️ Persist monitored geofences: [] 09-20 08:06:44.287 DEBUG [LocationAuthorization withBackgroundPermission] ℹ️ LocationAuthorization: Permission granted 09-20 08:06:44.287 INFO [GeofenceDAO create] ✅ identifier_12 09-20 08:06:44.288 INFO [GeofenceDAO create] ✅ identifier_425277 09-20 08:06:44.297 INFO [TSGeofenceManager start] 🎾 Start monitoring geofences 09-20 08:06:44.298 DEBUG [HttpService startMonitoringConnectivityChanges] 🎾 Start monitoring connectivity changes 09-20 08:06:44.300 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 🎾 Start monitoring powersave changes 09-20 08:06:44.300 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 09-20 08:06:44.302 DEBUG [HttpService a] ╔═════════════════════════════════════════════ ║ 📶 Connectivity change: connected? true ╠═════════════════════════════════════════════ 09-20 08:06:44.304 INFO [HeartbeatService stop] 🔴 Stop heartbeat 09-20 08:06:44.305 INFO [TrackingService changePace] 🔵 setPace: false → false 09-20 08:06:44.317 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 7 (49ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 32.583432,74.089778 hAcc=17.886 et=+4d12h1m40s732ms alt=192.29998779296875 vAcc=1.2910863], time: 1695179204267 09-20 08:06:44.318 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: false 09-20 08:06:44.318 DEBUG [TSLocationManager a] Median accuracy: 14.057 09-20 08:06:44.322 INFO [SQLiteLocationDAO persist] ✅ INSERT: 16981e13-d16b-42ee-94e8-6c598655dfef 09-20 08:06:44.323 INFO [HttpService flush] ℹ️ HttpService is busy 09-20 08:06:44.332 DEBUG [TSGeofenceManager startMonitoringStationaryRegion] 🎾 Start monitoring stationary region (radius: 150.0m 32.5834315,74.089778 hAcc=17.886) 09-20 08:06:44.334 DEBUG [TSGeofenceManager$f a] ℹ️ GeofencingClient addGeofences SUCCESS 09-20 08:06:44.334 DEBUG [TSGeofenceManager c] ℹ️ Persist monitored geofences: [identifier_12, identifier_425277] 09-20 08:06:44.335 DEBUG [TSGeofenceManager$f a] ╔═════════════════════════════════════════════ ║ TSGeofenceManager monitoring 2/2 ╠═════════════════════════════════════════════ ╟─ 🎾 identifier_12 ╟─ 🎾 identifier_425277 ╚═════════════════════════════════════════════ 09-20 08:06:44.348 DEBUG [AbstractService a] 🎾 START [TrackingService startId: 7, eventCount: 1] 09-20 08:06:44.348 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: false ╠═════════════════════════════════════════════ 09-20 08:06:44.350 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 7, eventCount: 0, sticky: false] 09-20 08:06:44.446 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 08:06:44.447 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: b95bbfdd-00b9-4f17-be38-8b6ca8f96a15 09-20 08:06:44.454 DEBUG [SQLiteLocationDAO first] ✅ Locked 1 records 09-20 08:06:44.455 INFO [HttpService a] 🔵 HTTP POST: 16981e13-d16b-42ee-94e8-6c598655dfef 09-20 08:06:44.512 INFO [TSScheduleManager oneShot] ⏰ Oneshot TERMINATE_EVENT is already pending 09-20 08:06:44.540 DEBUG [TSLocationManagerActivity a] locationsettings 09-20 08:06:44.540 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 09-20 08:06:44.571 DEBUG [AbstractService f] ⚙️︎ TrackingService.stopSelfResult(7): true 09-20 08:06:44.573 DEBUG [TSLocationManagerActivity c] eventCount: 0 09-20 08:06:44.597 DEBUG [AbstractService onDestroy] 🔴 TrackingService stopped 09-20 08:06:44.637 DEBUG [TSLocationManagerActivity onDestroy] 09-20 08:06:44.948 INFO [HttpService$f onResponse] 🔵 Response: 200 09-20 08:06:44.950 DEBUG [SQLiteLocationDAO destroy] ✅ DESTROY: 16981e13-d16b-42ee-94e8-6c598655dfef 09-20 08:06:44.954 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 4 09-20 08:06:45.305 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 0) ╠═════════════════════════════════════════════ 09-20 08:06:51.921 DEBUG [AbstractService a] 🎾 START [ActivityRecognitionService startId: 1, eventCount: 1] 09-20 08:06:51.922 DEBUG [ActivityRecognitionService a] 🚘 ️DetectedActivity [type=STILL, confidence=100] 09-20 08:06:51.925 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false] 09-20 08:06:51.963 DEBUG [AbstractService a] 🎾 START [ActivityRecognitionService startId: 2, eventCount: 1] 09-20 08:06:51.965 DEBUG [ActivityRecognitionService a] *** wasMoving: false, nowMoving: false, startedMoving: false, justStopped; false 09-20 08:06:51.965 INFO [ActivityRecognitionService a] ╔═════════════════════════════════════════════ ║ Motion Transition Result ╠═════════════════════════════════════════════ ╟─ 🎾 ENTER: still ╚═════════════════════════════════════════════ 09-20 08:06:51.965 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false] 09-20 08:06:52.170 DEBUG [AbstractService f] ⚙️︎ ActivityRecognitionService.stopSelfResult(2): true 09-20 08:06:52.171 DEBUG [AbstractService onDestroy] 🔴 ActivityRecognitionService stopped ```
christocracy commented 1 year ago

Do you know what this means?

09-20 08:06:51.965 INFO [ActivityRecognitionService a] 
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🎾  ENTER: still
╚═════════════════════════════════════════════

Do you understand what Config.stopTimeout does?

chnauman commented 1 year ago

yes, I didn't set Config.stopTimeout value, considering that its default value is 5 minutes. Which means that plugin will stop getting background location after 5 minutes the device stops moving. But here the device was definitely moving when the device entered the geofence.. See in the log it says that the device got out of geofence

╔═════════════════════════════════════════════
║ Geofencing Event: EXIT
╠═════════════════════════════════════════════
╟─ identifier_12
╚═════════════════════════════════════════════

How can a device which is out of the geofence enter the geofence stationary?

christocracy commented 1 year ago

How can a device which is out of the geofence enter the geofence stationary?

Geofences are handled completely by the OS. The plug-in is only the mailman, delivering the events it receives from the OS. The plug-in has no opinion about the validity of a geofence event.

chnauman commented 1 year ago

it's fine that Geofences are handled by OS. but when you say you are testing it everyday from last 9 years definitely you are testing geofences on android too. So,

  1. The question is how to solve this problem?
  2. Do I need to set some specific parameter which I am missing? a larger value for Config.stopTimeout will help?

By the way, another reason could be that plugin was not active in the background when the device was moving and when I reached home and after some time when I clicked the home button to turn on screen only then geofence entry event triggered. and because by then device was still so the log says:

09-20 08:06:51.965 INFO [ActivityRecognitionService a] ╔═════════════════════════════════════════════ ║ Motion Transition Result ╠═════════════════════════════════════════════ ╟─ 🎾 ENTER: still ╚═════════════════════════════════════════════

christocracy commented 1 year ago

The question is how to solve this problem?

How do I reproduce this "problem"? I do not have this problem on my devices running the Demo app.

Do I need to set some specific parameter which I am missing

No.

I suggest you visit https://dontkillmyapp.com.

definitely you are testing geofences on android too.

Yes. I monitor the same set of 19 geofences all around my neighbourhood on both iOS and Android for years. I trigger them almost daily.

iOS

Screenshot 2023-09-21 at 10 02 08 AM

Android

Screenshot 2023-09-21 at 10 01 46 AM
github-actions[bot] commented 6 months ago

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

github-actions[bot] commented 5 months ago

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