transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

BG Geolocation keeps on tracking/sending locations continuously even when user/device is still or within the specified distance filter #1384

Closed tushaagit closed 1 year ago

tushaagit commented 1 year ago

BG Geolocation keeps on tracking/sending locations continuously even when user/device is still


Your Environment

bgGeo.setConfig({ url: window.app.config.serviceServicePath + 'RecordUserGeoLocation', params: { "EmployeeID": empID, "UserID": userID, "UserName": userName, "Remarks": "Transistorsoft Recording", "AttendanceID": localStorage.getItem("AttendanceID"), } }



## Expected Behavior
 BG Geolocation tracking should stop once user is in stationary mode or moves within the specified distance filter of 50 meters

## Actual Behavior
BG gelocation keeps on tracking, sending updated locations periodically, without considering the distance filter, so the plotted map looks scattered, also whenever user is in any residential premises, many locations are inaccurately recorded, it takes location which is very far say 1-2 km away, that is why the odometer reading also increases, even though actual movement is very less or in stationary mode

## Steps to Reproduce

1. Start the location service BGGeo.Start, 
2. Start the movement say on bike/car, Location uploading starts
3. when user goes into stationary mode, say for servicing/maintenance job in any premises, still the recording of locations keeps on going, also indoor locations differ a lot with that of actual location

## Context
We found that many devices had this issue while in indoor/ or in any premise (Please check the attached log (from 9:38 am to 11:15 am) and map screenshot for better understanding of issue)

## Debug logs
<!-- include iOS / Android logs
- ios XCode logs,
- use #getLog #emailLog methods (@see docs)
- Android: $ adb logcat
-->
<details>
    <summary>Logs</summary>

```<!-- Syntax highlighting:  DO NOT REMOVE -->

01-23 08:55:37.721 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ TSLocationManager version: 3.2.1 (407)
╠═════════════════════════════════════════════
╟─ samsung SM-A307FN @ 11 (cordova)
{
  "activityRecognitionInterval": 10000,
  "allowIdenticalLocations": false,
  "authorization": {},
  "autoSync": true,
  "autoSyncThreshold": 0,
  "backgroundPermissionRationale": {
    "title": "Allow {applicationName} to access to this device's location in the background?",
    "message": "In order to track your activity in the background, please enable {backgroundPermissionOptionLabel} location permission",
    "positiveAction": "Change to {backgroundPermissionOptionLabel}",
    "negativeAction": "Cancel"
  },
  "batchSync": false,
  "configUrl": "",
  "debug": false,
  "deferTime": 0,
  "desiredAccuracy": -1,
  "desiredOdometerAccuracy": 150,
  "disableAutoSyncOnCellular": false,
  "disableElasticity": true,
  "disableLocationAuthorizationAlert": false,
  "disableMotionActivityUpdates": false,
  "disableStopDetection": false,
  "distanceFilter": 50,
  "elasticityMultiplier": 1,
  "enableHeadless": true,
  "enableTimestampMeta": false,
  "extras": {},
  "fastestLocationUpdateInterval": -1,
  "foregroundService": true,
  "geofenceInitialTriggerEntry": true,
  "geofenceModeHighAccuracy": false,
  "geofenceProximityRadius": 1000,
  "geofenceTemplate": "",
  "headers": {},
  "headlessJobService": "com.transistorsoft.cordova.bggeo.BackgroundGeolocationHeadlessTask",
  "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": "",
    "text": "Location Service activated",
    "color": "",
    "channelName": "TSLocationManager",
    "smallIcon": "",
    "largeIcon": "",
    "priority": -2,
    "sticky": false,
    "strings": {},
    "actions": []
  },
  "params": {
    "EmployeeID": "19",
    "UserID": "19",
    "UserName": "DMK",
    "Remarks": "Transistorsoft Recording",
    "AttendanceID": "28698"
  },
  "persist": true,
  "persistMode": 1,
  "schedule": [],
  "scheduleUseAlarmManager": false,
  "speedJumpFilter": 300,
  "startOnBoot": false,
  "stationaryRadius": 25,
  "stopAfterElapsedMinutes": 0,
  "stopOnStationary": false,
  "stopOnTerminate": false,
  "stopTimeout": 10,
  "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
  "url": "https:\/\/apiserviceolympia.erpbynet.com\/api\/RecordUserGeoLocation",
  "useSignificantChangesOnly": false,
  "enabled": false,
  "schedulerEnabled": false,
  "trackingMode": 1,
  "odometer": 13677.900390625,
  "isFirstBoot": false,
  "didLaunchInBackground": false,
  "didDeviceReboot": false
}
01-23 08:55:37.722 INFO [TSConfig print] 
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅  ACCELEROMETER: {Sensor name="LSM6DSL Accelerometer", vendor="STM", version=1, type=1, maxRange=39.2266, resolution=0.0011971008, power=0.13, minDelay=10000}
╟─ ✅  GYROSCOPE: {Sensor name="LSM6DSL Gyroscope", vendor="STM", version=1, type=4, maxRange=17.45326, resolution=6.1086525E-4, power=6.1, minDelay=10000}
╟─ ✅  MAGNETOMETER: {Sensor name="YAS539 Magnetometer", vendor="Yamaha Corporation", version=1, type=2, maxRange=1200.0, resolution=0.06, power=6.0, minDelay=10000}
╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="LSM6DSL Significant Motion Detector", vendor="STM", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.75, minDelay=-1}
╚═════════════════════════════════════════════
01-23 08:55:37.730 INFO [BackgroundGeolocation <init>] 
  ✅  Google Play Services: connected (version code:12451000)
01-23 08:55:37.734 DEBUG [LifecycleManager onCreate] ☯️  onCreate
01-23 08:55:37.734 DEBUG [LifecycleManager onStart] ☯️  onStart
01-23 08:55:37.735 DEBUG [LifecycleManager onResume] ☯️  onResume
01-23 08:55:37.758 INFO [TSProviderManager startMonitoring] 
  🎾  Start monitoring location-provider changes
01-23 08:55:37.771 DEBUG [b prune] 
  ℹ️  PRUNE -1 days
01-23 08:55:37.809 DEBUG [TSConfig d] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.positiveAction, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, distanceFilter, enableHeadless, headlessJobService, logLevel, notification, notification.priority, persistMode, stopOnTerminate, stopTimeout]
01-23 08:55:38.620 DEBUG [LifecycleManager onPause] ☯️  onPause
01-23 08:55:38.722 DEBUG [LifecycleManager onResume] ☯️  onResume
01-23 08:56:05.219 ERROR [TSLocationManager getLastLocation] 
  ‼️  Failed to get last location: com.google.android.gms.tasks.zzw@8731b99
01-23 08:56:05.222 DEBUG [c h] 
  ℹ️  LocationAuthorization: Permission granted
01-23 08:56:05.227 INFO [TSLocationManager setOdometer] 
  ℹ️  setOdometer: 0.0, isMoving: false
01-23 08:56:05.228 DEBUG [TSLocationManager clearLastOdometerLocation] 
  ℹ️  Clear last odometer location
01-23 08:56:05.234 DEBUG [c h] 
  ℹ️  LocationAuthorization: Permission granted
01-23 08:56:05.263 DEBUG [AbstractService start] 
  🎾  LocationRequestService [eventCount: 1]
01-23 08:56:05.264 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 2, requestId: 1]
01-23 08:56:05.265 DEBUG [AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: true]
01-23 08:56:05.266 DEBUG [TSConfig d] ℹ️   Persist config, dirty: [params, url]
01-23 08:56:05.290 INFO [c g] 
  🔵  LocationAuthorization: Requesting Background permission
01-23 08:56:05.408 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

01-23 08:56:05.421 DEBUG [AbstractService start] 
  🎾  LocationRequestService [eventCount: 1]
01-23 08:56:05.422 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 2, requestId: 2]
01-23 08:56:05.424 DEBUG [AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: true]
01-23 08:56:05.974 DEBUG [HttpService startMonitoringConnectivityChanges] 
  🎾  Start monitoring connectivity changes
01-23 08:56:05.985 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 
  🎾  Start monitoring powersave changes
01-23 08:56:05.994 DEBUG [HttpService a] 
╔═════════════════════════════════════════════
║ 📶  Connectivity change: connected? true
╠═════════════════════════════════════════════

01-23 08:56:06.044 INFO [HeartbeatService stop] 
  🔴  Stop heartbeat
01-23 08:56:06.053 DEBUG [c h] 
  ℹ️  LocationAuthorization: Permission granted
01-23 08:56:06.054 INFO [TrackingService changePace] 
  🔵  setPace: false → false
01-23 08:56:06.157 DEBUG [AbstractService start] 
  🎾  LocationRequestService [eventCount: 1]
01-23 08:56:06.159 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 1, requestId: 3]
01-23 08:56:06.164 WARN [ActivityRecognitionService start] 
  ⚠️  Cannot start motion-activity updates:  permission is denied
01-23 08:56:06.166 DEBUG [AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: true]
01-23 08:56:06.241 DEBUG [TSLocationManagerActivity execute] locationsettings
01-23 08:56:06.243 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-23 08:56:06.301 DEBUG [TSLocationManagerActivity stop] eventCount: 0
01-23 08:56:06.427 DEBUG [TSLocationManagerActivity onDestroy] 
01-23 08:56:07.000 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

01-23 09:55:40.801 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:55:40.802 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 135
01-23 09:55:40.808 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:55:40.809 INFO [HttpService a] 
  🔵  HTTP POST: 6c1cb0b3-62ea-44ee-859f-07f020097aed
01-23 09:55:41.119 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:55:41.121 DEBUG [b destroy] 
  ✅  DESTROY: 6c1cb0b3-62ea-44ee-859f-07f020097aed
01-23 09:55:41.124 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 135
01-23 09:55:41.126 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:55:41.129 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:55:50.751 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:55:50.755 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.495423,73.952963 hAcc=88 et=+1d14h15m30s595ms alt=506.1999816894531 vel=12.922804 bear=310.95334 vAcc=15 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 103ms, time: 1674447950649

01-23 09:55:50.756 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:55:50.756 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 134.02031, apparent speed: 13.355288
01-23 09:55:50.757 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 92.9
01-23 09:55:50.760 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:55:50.772 INFO [b persist] 
  ✅  INSERT: 1cc50768-d95b-4c79-ab08-7ae92a12b3c4
01-23 09:55:50.780 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 70035ms (jobID: -18513055)
01-23 09:55:50.787 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:55:50.793 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:55:50.814 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:55:50.815 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 136
01-23 09:55:50.820 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:55:50.820 INFO [HttpService a] 
  🔵  HTTP POST: 1cc50768-d95b-4c79-ab08-7ae92a12b3c4
01-23 09:55:51.204 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:55:51.206 DEBUG [b destroy] 
  ✅  DESTROY: 1cc50768-d95b-4c79-ab08-7ae92a12b3c4
01-23 09:55:51.210 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 136
01-23 09:55:51.211 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:55:51.214 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:55:55.567 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:55:55.571 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.495087,73.953437 hAcc=90 et=+1d14h15m35s408ms alt=501.1999816894531 vel=2.121624 bear=115.98067 vAcc=21 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 107ms, time: 1674447955462

01-23 09:55:55.572 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:55:55.573 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 92.9
01-23 09:55:55.575 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:55:55.585 INFO [b persist] 
  ✅  INSERT: cd896998-dcc8-4ec2-8c40-59b254024d28
01-23 09:55:55.589 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 64813ms (jobID: -18513055)
01-23 09:55:55.599 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:55:55.609 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:55:55.633 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:55:55.633 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 137
01-23 09:55:55.639 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:55:55.640 INFO [HttpService a] 
  🔵  HTTP POST: cd896998-dcc8-4ec2-8c40-59b254024d28
01-23 09:55:55.832 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:55:55.833 DEBUG [b destroy] 
  ✅  DESTROY: cd896998-dcc8-4ec2-8c40-59b254024d28
01-23 09:55:55.837 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 137
01-23 09:55:55.839 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:55:55.841 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:56:05.691 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:56:05.695 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.494770,73.953803 hAcc=88 et=+1d14h15m45s545ms alt=501.1999816894531 vel=4.174587 bear=125.00862 vAcc=19 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 93ms, time: 1674447965600

01-23 09:56:05.696 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:56:05.697 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 92.9
01-23 09:56:05.700 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:56:05.711 INFO [b persist] 
  ✅  INSERT: 16a07627-ca48-4e55-8df7-80543eeaa603
01-23 09:56:05.714 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 70137ms (jobID: -18513055)
01-23 09:56:05.722 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:56:05.736 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:56:05.757 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:56:05.757 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 138
01-23 09:56:05.764 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:56:05.765 INFO [HttpService a] 
  🔵  HTTP POST: 16a07627-ca48-4e55-8df7-80543eeaa603
01-23 09:56:06.199 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:56:06.203 DEBUG [b destroy] 
  ✅  DESTROY: 16a07627-ca48-4e55-8df7-80543eeaa603
01-23 09:56:06.207 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 138
01-23 09:56:06.208 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:56:06.211 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:56:26.001 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:56:26.006 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.495276,73.953027 hAcc=76 et=+1d14h16m5s759ms alt=506.1999816894531 vel=12.173496 bear=313.19778 vAcc=8 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 189ms, time: 1674447985813

01-23 09:56:26.010 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:56:26.011 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 99.2852, apparent speed: 4.911705
01-23 09:56:26.011 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 92.9
01-23 09:56:26.016 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:56:26.028 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 80214ms (jobID: -18513055)
01-23 09:56:26.034 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:56:26.035 INFO [b persist] 
  ✅  INSERT: 4d586deb-7900-49f4-98a7-7e06686eb0d7
01-23 09:56:26.066 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:56:26.203 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:56:26.203 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 139
01-23 09:56:26.213 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:56:26.214 INFO [HttpService a] 
  🔵  HTTP POST: 4d586deb-7900-49f4-98a7-7e06686eb0d7
01-23 09:56:26.292 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:56:26.296 DEBUG [b destroy] 
  ✅  DESTROY: 4d586deb-7900-49f4-98a7-7e06686eb0d7
01-23 09:56:26.300 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 139
01-23 09:56:26.301 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:56:26.316 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:57:01.439 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:57:01.443 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.495026,73.953501 hAcc=116 et=+1d14h16m39s25ms alt=501.6999816894531 vel=4.5230427 bear=127.68246 vAcc=18 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 2362ms, time: 1674448019080

01-23 09:57:01.444 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:57:01.445 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 92.9
01-23 09:57:01.450 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:57:01.459 INFO [b persist] 
  ✅  INSERT: 4d294c4f-2992-4c4b-8971-bcf3dcd79bfc
01-23 09:57:01.473 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 93266ms (jobID: -18513055)
01-23 09:57:01.481 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:57:01.483 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:57:01.507 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:57:01.507 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 140
01-23 09:57:01.520 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:57:01.521 INFO [HttpService a] 
  🔵  HTTP POST: 4d294c4f-2992-4c4b-8971-bcf3dcd79bfc
01-23 09:57:01.605 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:57:01.607 DEBUG [b destroy] 
  ✅  DESTROY: 4d294c4f-2992-4c4b-8971-bcf3dcd79bfc
01-23 09:57:01.611 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 140
01-23 09:57:01.612 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:57:01.614 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:57:06.473 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:57:06.477 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.494586,73.954048 hAcc=110 et=+1d14h16m46s330ms alt=501.6999816894531 vel=8.273054 bear=129.8024 vAcc=23 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 91ms, time: 1674448026385

01-23 09:57:06.477 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:57:06.478 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 92.9
01-23 09:57:06.483 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:57:06.490 INFO [b persist] 
  ✅  INSERT: 8c09a8a7-9a18-449c-8b2c-073efc343f1e
01-23 09:57:06.505 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 67305ms (jobID: -18513055)
01-23 09:57:06.508 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:57:06.522 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:57:06.541 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:57:06.541 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 141
01-23 09:57:06.544 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:57:06.545 INFO [HttpService a] 
  🔵  HTTP POST: 8c09a8a7-9a18-449c-8b2c-073efc343f1e
01-23 09:57:06.646 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:57:06.647 DEBUG [b destroy] 
  ✅  DESTROY: 8c09a8a7-9a18-449c-8b2c-073efc343f1e
01-23 09:57:06.651 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 141
01-23 09:57:06.651 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:57:06.653 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:57:11.468 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:57:11.470 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.495498,73.952869 hAcc=52 et=+1d14h16m51s316ms alt=506.1999816894531 vel=15.116799 bear=309.02945 vAcc=7 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 99ms, time: 1674448031370

01-23 09:57:11.471 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:57:11.472 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 160.22612, apparent speed: 32.135204
01-23 09:57:11.473 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 90.25
01-23 09:57:11.476 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:57:11.476 DEBUG [TSLocationManager incrementOdometer] Odometer: 8896.62
01-23 09:57:11.484 INFO [b persist] 
  ✅  INSERT: 8f2738a8-4714-47a6-b78b-a09fb23a5e57
01-23 09:57:11.492 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 64986ms (jobID: -18513055)
01-23 09:57:11.504 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:57:11.506 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:57:11.565 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:57:11.565 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 142
01-23 09:57:11.569 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:57:11.570 INFO [HttpService a] 
  🔵  HTTP POST: 8f2738a8-4714-47a6-b78b-a09fb23a5e57
01-23 09:57:11.646 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:57:11.647 DEBUG [b destroy] 
  ✅  DESTROY: 8f2738a8-4714-47a6-b78b-a09fb23a5e57
01-23 09:57:11.651 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 142
01-23 09:57:11.651 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:57:11.654 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:57:27.093 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:57:27.110 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.494876,73.953514 hAcc=72 et=+1d14h17m6s886ms alt=501.6000061035156 vel=19.726603 bear=133.49498 vAcc=8 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 166ms, time: 1674448046941

01-23 09:57:27.111 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:57:27.112 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 96.794136, apparent speed: 6.2167077
01-23 09:57:27.112 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:57:27.112 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 87.6
01-23 09:57:27.113 DEBUG [TSLocationManager incrementOdometer] Odometer: 8993.414
01-23 09:57:27.122 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 75570ms (jobID: -18513055)
01-23 09:57:27.128 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:57:27.131 INFO [b persist] 
  ✅  INSERT: b208d132-7f24-44d2-ab04-af7e1b9d37f7
01-23 09:57:27.250 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:57:27.277 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:57:27.278 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 143
01-23 09:57:27.291 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:57:27.291 INFO [HttpService a] 
  🔵  HTTP POST: b208d132-7f24-44d2-ab04-af7e1b9d37f7
01-23 09:57:27.389 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:57:27.390 DEBUG [b destroy] 
  ✅  DESTROY: b208d132-7f24-44d2-ab04-af7e1b9d37f7
01-23 09:57:27.407 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 143
01-23 09:57:27.409 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:57:27.412 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:57:33.641 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:57:33.643 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.494471,73.954189 hAcc=108 et=+1d14h17m13s493ms alt=506.1999816894531 vel=15.580053 bear=128.18364 vAcc=9 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 95ms, time: 1674448053548

01-23 09:57:33.649 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:57:33.650 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 87.6
01-23 09:57:33.650 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:57:33.663 INFO [b persist] 
  ✅  INSERT: dc731c1f-f706-4d7a-a4a8-4d17affe93d5
01-23 09:57:33.666 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 66607ms (jobID: -18513055)
01-23 09:57:33.670 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:57:33.683 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:57:33.707 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:57:33.712 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 144
01-23 09:57:33.721 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:57:33.721 INFO [HttpService a] 
  🔵  HTTP POST: dc731c1f-f706-4d7a-a4a8-4d17affe93d5
01-23 09:57:33.794 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:57:33.795 DEBUG [b destroy] 
  ✅  DESTROY: dc731c1f-f706-4d7a-a4a8-4d17affe93d5
01-23 09:57:33.797 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 144
01-23 09:57:33.798 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:57:33.801 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:57:37.677 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:57:37.682 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.494810,73.953794 hAcc=113 et=+1d14h17m17s483ms alt=506.1999816894531 vel=7.202067 bear=126.02387 vAcc=8 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 142ms, time: 1674448057538

01-23 09:57:37.684 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:57:37.684 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 90.25
01-23 09:57:37.693 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:57:37.703 INFO [b persist] 
  ✅  INSERT: 184fa211-b20f-41a8-a28e-341d5023a9f0
01-23 09:57:37.716 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 63990ms (jobID: -18513055)
01-23 09:57:37.729 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:57:37.730 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:57:37.756 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:57:37.757 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 145
01-23 09:57:37.770 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:57:37.771 INFO [HttpService a] 
  🔵  HTTP POST: 184fa211-b20f-41a8-a28e-341d5023a9f0
01-23 09:57:37.866 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:57:37.868 DEBUG [b destroy] 
  ✅  DESTROY: 184fa211-b20f-41a8-a28e-341d5023a9f0
01-23 09:57:37.872 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 145
01-23 09:57:37.873 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:57:37.879 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:57:46.843 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:57:46.847 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.494450,73.954113 hAcc=99 et=+1d14h17m26s699ms alt=501.6999816894531 vel=5.348858 bear=132.30127 vAcc=7 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 91ms, time: 1674448066754

01-23 09:57:46.848 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:57:46.848 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 90.25
01-23 09:57:46.859 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:57:46.881 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 69216ms (jobID: -18513055)
01-23 09:57:46.886 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:57:46.896 INFO [b persist] 
  ✅  INSERT: 72788675-b539-4876-b3db-476f669718e2
01-23 09:57:46.952 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:57:46.975 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:57:46.976 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 146
01-23 09:57:46.981 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:57:46.981 INFO [HttpService a] 
  🔵  HTTP POST: 72788675-b539-4876-b3db-476f669718e2
01-23 09:57:47.077 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:57:47.079 DEBUG [b destroy] 
  ✅  DESTROY: 72788675-b539-4876-b3db-476f669718e2
01-23 09:57:47.081 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 146
01-23 09:57:47.082 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:57:47.086 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:57:51.961 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:57:51.978 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.495301,73.953076 hAcc=86 et=+1d14h17m31s808ms alt=506.1999816894531 vel=14.069307 bear=310.63577 vAcc=8 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 101ms, time: 1674448071863

01-23 09:57:51.979 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:57:51.980 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 144.49574, apparent speed: 28.282589
01-23 09:57:51.980 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 90.25
01-23 09:57:51.985 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:57:52.000 INFO [b persist] 
  ✅  INSERT: 3fb26652-6cf2-436b-bf1a-e951cb6deacf
01-23 09:57:52.010 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 65109ms (jobID: -18513055)
01-23 09:57:52.019 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:57:52.039 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

01-23 09:57:52.054 DEBUG [AbstractService start] 
  🎾  BackgroundTaskService [eventCount: 1]
01-23 09:57:52.055 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 147
01-23 09:57:52.068 DEBUG [b first] 
  ✅  Locked 1 records
01-23 09:57:52.069 INFO [HttpService a] 
  🔵  HTTP POST: 3fb26652-6cf2-436b-bf1a-e951cb6deacf
01-23 09:57:52.135 INFO [HttpService$h onResponse] 
  🔵  Response: 200
01-23 09:57:52.137 DEBUG [b destroy] 
  ✅  DESTROY: 3fb26652-6cf2-436b-bf1a-e951cb6deacf
01-23 09:57:52.157 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 147
01-23 09:57:52.158 DEBUG [AbstractService finish] ⚙️︎  finish BackgroundTaskService [eventCount: 0, sticky: false]
01-23 09:57:52.160 DEBUG [AbstractService onDestroy] 
  🔴  BackgroundTaskService stopped
01-23 09:58:02.902 DEBUG [AbstractService start] 
  🎾  TrackingService [eventCount: 1]
01-23 09:58:02.919 DEBUG [TrackingService handleLocationResult] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 18.494719,73.953346 hAcc=87 et=+1d14h17m42s594ms alt=501.6000061035156 vel=8.331809 bear=155.34306 vAcc=6 sAcc=??? bAcc=??? {Bundle[{}]}]
╟─ Age: 264ms, time: 1674448082648

01-23 09:58:02.922 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-23 09:58:02.923 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 87.426
01-23 09:58:02.945 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-23 09:58:02.950 INFO [b persist] 
  ✅  INSERT: 9346dead-e369-4575-87a1-e18984392d4c
01-23 09:58:02.967 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 70786ms (jobID: -18513055)
01-23 09:58:02.979 DEBUG [AbstractService finish] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-23 09:58:02.983 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠════════════════════════════════════════════

</details>

[bggeolocationLog_23012023.txt](https://github.com/transistorsoft/cordova-background-geolocation-lt/files/10480366/bggeolocationLog_23012023.txt)
![Screenshot 2023-01-23 192823](https://user-images.githubusercontent.com/25794059/214057543-44994915-e190-4a3a-b5e7-ddeef80ccc6d.png)
christocracy commented 1 year ago

What you are likely experiencing here is a user walking around a home / office, where the Android MotionActivity API keeps triggering into the "moving" state. The plugin will not return to the "stationary" state until the MotionaActivity API reports the device is still, when the plugin initiates the stopTimeout timer (which you've configured to 10 minutes.).

Once the stopTimeout timer is engaged, it will be cancelled if the MotionActivity api reports any movement (eg: on_foot). Only after the stopTimeout timer expires will the plugin return to the "stationary" state and turn off location-services.

You can add a Config.motionTriggerDelay (eg: 30000ms) to help decrease spurious motion-triggers while walking around a house.

christocracy commented 1 year ago

foregroundService: true,

Btw, this old Config option is no longer used. You can delete it.

tushaagit commented 1 year ago

Ok, Sir will delete that option, but if we are setting options: distanceFilter: 50 and stationaryRadius: 25, then ideally it should not record that many locations in a span of 2 hrs even though a little movement on foot is recorded, as user is somewhere in the lift for its maintenance, and there is not much scope for the movement which can exceed 25/50 meters.

christocracy commented 1 year ago

It’s not easy to perform distance calculations indoors, where location accuracy is typically 40-60 meters, much greater than your configured stationaryRadius: 25.

tushaagit commented 1 year ago

Screenshot 2023-01-23 192823 No, infact we don't want to calculate the distance travelled, while user is in the premises, thats why we have applied distance filter of 50 meters, as user will be majorly working on maintenance of lifts where movement is minimal, we want to keep the location updates as minimum as possible while user is in any premises, and whenever user starts moving again .i.e leaving the premises, then again we want to track his travel. 2 major issues we are facing right now are: 1] Eventhough user is not moving much i.e beyond 25/50 meter still lot of locations gets uploaded, 2] while user is stationary, the locations captured are inaccurate in premises, i.e locations differ by nearly 1 km or so, and because of this, system considers that the user has travelled that much of distance e.g: 1km for each inaccurate location, so if 25 inaccurate locations are captured then odometer increases by 25 km, which is another major issue which we are facing currently. If user has actually travelled by vehicle suppose a distance of 10 km from his home to premise and returns back to his home 10km, so total odometer km should be something around 20, but as it considers inaccurate locations (whose odometer calculation has gone upto 25km, it sums up that with the to-and fro commuting km value (i.e 20km). So total distance travelled comes as 45. Hopefully you got my point.

christocracy commented 1 year ago

No, infact we don't want to calculate the distance travelled, while user is in the premises, thats why we have applied distance filter of 50 meters,

It doesn't matter. When the Motion API detects movement while in the stationary state, location-services are currently OFF and the plugin has no idea where the device is. When movement is detected, the plugin then turns on location-services, records the motionchange location, fires the onMotionChange event. Now the plugin is in the moving state where location-services are ON.

Simply configure an appropriate Config.motionTriggerDelay to reduce these "false positive" motion-changes.

tushaagit commented 1 year ago

Ok Sir, but what about sudden spikes i.e inaccurate locations captured in premises, that can also ignored, but the issue is it increases the odometer value also along with every false location captured by 500 - 700 meter,

christocracy commented 1 year ago

See api docs Config.desiredOdometerAccuracy

tushaagit commented 1 year ago

Sir, Desired odometer accuracy is set to 10 meters, added motion trigger delay of 30 secs, removed foreground service parameter, increased distance filter to 100 meters from 50 meters, With all above changes, most of the time locations are not recorded, only first few points and last few are getting recorded now, so map shows a straight line from start to end, also km not incrementing. Please guide. Also check the attached log and map image

background-geolocation.txt

MicrosoftTeams-image (23)

christocracy commented 1 year ago

What range of timestamps are you interested in within your logs?

tushaagit commented 1 year ago

Sir as per the date displayed on map .i.e track of 3rd february (03/02/2023), very few points are captured in this route. especially from 02-03 20:50:22.006 time onwards straight line is coming, no points plotted in between i.e from 02-03 20:50:22.006 till 02-03 21:00:02.213. Also if you observe the whole day's log, odometer km captured is 0 km. i cant see the incrementOdometer value anywhere, please guide, this is affecting our customers faith in the app.

tushaagit commented 1 year ago

Sir, Please reply, we are getting numerous calls from different technicians, located at different sites, using this tracking feature, every 5-6 technicians out of 10 reported either path issue (i.e locations not recording correctly or records for some period of time then stops recording) OR odometer inaccuracy related issues, which are of course interdependent (location tracking and respective odometer values). This is affecting the faith of the technicians in our app. Please look into it and suggest the solution. I have many logs with me, but just sticking to above log, so that it would not add the confusion. Also i am creating a separate thread where we installed your cordova BG Geo demo app from playstore and our 2-3 person used that app, and faced similar kind of issues.

christocracy commented 1 year ago

See http://dontkillmyapp.com

tushaagit commented 1 year ago

Hello Sir, referring to the original topic (BG Geolocation keeps on tracking/sending locations continuously even when user/device is still or within the specified distance filter) We are facing such issues every time and again for different devices, just to repoen the discussion i am sending another log, Here too many points (locations) got plotted/uploaded to server, even though user/device was still/sitting in the office, Please observe the log from 03-15 12:53:56.595 to 03-15 13:01:02.350, odometer incremented by nearly 4kms, Please let us know what changes/corrections can be done to avoid such issues

Screenshot 2023-03-15 144432 background-geolocation.txt

christocracy commented 1 year ago

The plugin uses the Motion API to learn when the device is moving. When the device is detected to be moving, the plugin turns on location-services and begins tracking location. When the motion API reports the device is no longer moving, the plugin initiates the Config.stopTimeout timer. When stopTimeout timer expires, the plugin turns off location-services and returns to the stationary state. See the wiki Philosophy of Operation.

Yes, if you get up from your desk to go to the washroom, the plugin can trigger location tracking for a short period.

See Config.motionTriggerDelay to help prevent these short movements throughout one's home/office from triggering location-tracking.

tushaagit commented 1 year ago

Sir, already applied motionTriggerDelay: 30000, as per your previous suggestion in this thread, also if employee moves just 10-50 meteres, and still his location gets recorded then what is the use of distanceFilter (100mtr) and stationary radius(70 mtr)? Also even if we do agree that motion is detected even for a small movement of 10-50 metres, still if we sum up the total distance travelled by employee in office for 1 hr, it will be hardly 200-300 mteres, then if we go by distance filter, for every 100 mtr, 1 location will be feteched, then max locations fetched should be in limit say (10-15 max), here i am showing you the log, where lot of points are plotted (120-150 locations) eventhough all parameters/filters exist to restrict the indoor movement. This issue is coming continuously for nearly all users, Please this is a request don't close the thresd, and try guide us to resolved our problem, this is affecting the clients trust in us and in turn the plugin used also.

christocracy commented 1 year ago

You are free to completely disable motion api triggering with Config.disableMotionActivityUpdates.

Then the plug-in will only use a geofence around the last known position to know when the device is moving and only stationaryRadius will apply.

tushaagit commented 1 year ago

background-geolocation.txt

Hello Sir, added this parameter to disableMotionActivityUpdates:true, to config, as per your suggestion, still we are getting lot of locations (today getting 3-4 locations every minute) even when user/device is still or within the specified distance filter (100) Please check and guide us to some solution. This issue is getting escalated, please help. Attaching todays log, Can check for any particular time period eg: 03-17 15:00:00.755 To 03-17 16:05:45.379.

christocracy commented 1 year ago

Your problem is not caused by the plug-in.

YOU are clearly calling .getCurrentPosition() repeatedly in your own code.

tushaagit commented 1 year ago

yes Sir that we do call after some point of interval, but its there since 1 year now, we do it to check if gps setting is kept off by the user, if yes, we ask him to enable it before doing any further activity in app. So Don't why this is affecting our regular transistor URL recording interval now. Because as we are already setting 100 meter distance filter and 75 stationary radius, motionTriggerDelay: 30000, and disableMotionActivityUpdates:true, so expected is, though the location is fetched, it should not get stored to sqlite DB neither it should get uploaded to provided URL. This is happening since last 2-3 days only

christocracy commented 1 year ago

(today getting 3-4 locations every minute)

Your logs clearly show .getCurrentPosition() being called repeatedly.

Disable your call to .getCurrentPosition() and investigate your Timer code.