react-native-background-geolocation
react-native-background-geolocation copied to clipboard
[HELP] Location precision when drawing tracked path on map
Your Environment
- Plugin version: 4.12.0
- Platform: Android
- OS version: Any
- Device manufacturer / model: Any
- React Native version (
react-native -v
): 0.71.8 - Plugin config
{
desiredAccuracy: Geo.DESIRED_ACCURACY_HIGH,
distanceFilter: 10,
disableStopDetection: true,
debug: __DEV__,
logLevel: Geo.LOG_LEVEL_VERBOSE,
batchSync: false,
autoSync: false,
disableElasticity: true,
reset: true,
notification: {
title: 'Oiro',
color: '#563777',
text:
'Seu trajeto está sendo traçado enquanto o aplicativo está em segundo plano',
},
},
Expected Behavior
Location updates that indicates user position with more precision.
Actual Behavior
The location precision, mostly when stopped, isn't that great and sometimes shows user moving when it' not.
Context
I've tried some configuration options, and some location filtering by accuracy and timestamp, but none of them seem to work quite as I expected. Most problems with precision happen when the user is stopped, and the location tracking updates the path quite a lot, as if the user were in fact moving all over the place. This is not exacly a bug report since I'm aware that GPS location updates are not precise, I'm just asking for some kind of advice for a configuration that can help the path to be precise (for now not caring too much about battery consumption), or other advices related to improving the precision of the app.
Provide a screenshot of a map showing what you mean.
Are you observing your logs? See wiki “Debugging” and see api docs “Logger”. Learn to use the method .emailLog.
Here's what the QA team sent me. I was not able to reproduce the problem on that magnitude, only some small mislocations, nothing that bad.
I did a short location tracking (about 4 minutes) where I was steady fixed in my place. I had about 3 location updates, and the tracking path was not that bad.
I got the logs from this specific tracking:
Logs
05-25 13:03:49.062 DEBUG [LoggerFacade$a a] PID: 2
05-25 13:03:49.075 DEBUG [LoggerFacade$a a] ℹ️ Persist config, dirty: []
05-25 13:03:49.088 DEBUG [LoggerFacade$a a] ℹ️ Persist config, dirty: [headlessJobService]
05-25 13:03:51.251 DEBUG [TSConfig d] ℹ️ Persist config, dirty: [autoSync, desiredAccuracy, disableElasticity, logLevel, notification, notification.title, notification.text, notification.color, speedJumpFilter]
05-25 13:04:05.445 DEBUG [LifecycleManager onPause] ☯️ onPause
05-25 13:04:07.326 DEBUG [LifecycleManager onResume] ☯️ onResume
05-25 13:04:16.116 INFO [c h]
🔵 LocationAuthorization: Requesting permission
05-25 13:04:18.462 DEBUG [LifecycleManager onPause] ☯️ onPause
05-25 13:04:19.805 INFO [c$j onPermissionGranted]
✅ LocationAuthorization: Permission granted
05-25 13:04:19.886 DEBUG [LifecycleManager onResume] ☯️ onResume
05-25 13:04:36.550 INFO [TSProviderManager handleProviderChangeEvent]
╔═════════════════════════════════════════════
║ Location-provider change: false
╠═════════════════════════════════════════════
╟─ GPS: false
╟─ Network: false
╟─ AP Mode: false
05-25 13:04:40.031 DEBUG [TSLocationManager clearLastOdometerLocation]
ℹ️ Clear last odometer location
05-25 13:04:40.059 INFO [ActivityRecognitionService stop]
🔴 Stop motion-activity updates
05-25 13:04:40.074 DEBUG [TSGeofenceManager d] ℹ️ Persist monitored geofences: []
05-25 13:04:40.075 DEBUG [TSGeofenceManager f]
🔴 Stop monitoring geofences
05-25 13:04:40.080 INFO [HeartbeatService stop]
🔴 Stop heartbeat
05-25 13:04:40.093 DEBUG [HttpService stopMonitoringConnectivityChanges]
🔴 Stop monitoring connectivity changes
05-25 13:04:41.090 INFO [c h]
🔵 LocationAuthorization: Requesting permission
05-25 13:04:41.283 INFO [c$j onPermissionGranted]
✅ LocationAuthorization: Permission granted
05-25 13:04:41.590 DEBUG [ForegroundNotification createNotificationChannel] NotificationChannel{mId='com.oiroapp.oiroTSLocationManager', mName=TSLocationManager, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mFgServiceShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mGroup='null', mAudioAttributes=null, mBlockableSystem=false, mAllowBubbles=true, mImportanceLockedByOEM=false, mImportanceLockedDefaultApp=false, mPreImportance=3}
05-25 13:04:42.098 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:04:42.104 INFO [SingleLocationRequest startUpdatingLocation]
🔵 [SingleLocationRequest start, action: 2, requestId: 2]
05-25 13:04:42.121 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: true]
05-25 13:04:43.415 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:04:43.421 INFO [LocationRequestService handleLocationResult]
╔═════════════════════════════════════════════
║ getCurrentPosition LocationResult: 2
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544108,-54,654483 hAcc=20 et=+2h15m14s484ms alt=103.20000457763672 vAcc=15 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=532]}], age: 3103ms, time: 1685030680316
05-25 13:04:43.432 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired current position
05-25 13:04:43.433 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 20.0
05-25 13:04:43.442 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:04:43.453 DEBUG [AbstractService onDestroy]
🔴 LocationRequestService stopped
05-25 13:04:43.523 DEBUG [LocationRequestService handleLocationResult] SingleLocationRequest 2 isFinished? true
05-25 13:04:43.526 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:04:47.063 INFO [c h]
🔵 LocationAuthorization: Requesting permission
05-25 13:04:47.067 INFO [c$j onPermissionGranted]
✅ LocationAuthorization: Permission granted
05-25 13:04:47.128 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:04:47.131 INFO [SingleLocationRequest startUpdatingLocation]
🔵 [SingleLocationRequest start, action: 2, requestId: 3]
05-25 13:04:47.138 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: true]
05-25 13:04:48.602 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:04:48.608 INFO [LocationRequestService handleLocationResult]
╔═════════════════════════════════════════════
║ getCurrentPosition LocationResult: 3
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544107,-54,654481 hAcc=20 et=+2h15m22s574ms alt=103.20000457763672 vel=0.08320163 vAcc=11 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=532]}], age: 201ms, time: 1685030688406
05-25 13:04:48.618 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired current position
05-25 13:04:48.624 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 20.0
05-25 13:04:48.634 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:04:48.640 DEBUG [LocationRequestService handleLocationResult] SingleLocationRequest 3 isFinished? true
05-25 13:04:48.642 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:04:48.652 DEBUG [AbstractService onDestroy]
🔴 LocationRequestService stopped
05-25 13:04:49.023 INFO [c g]
🔵 LocationAuthorization: Requesting Background permission
05-25 13:04:50.425 DEBUG [LifecycleManager onPause] ☯️ onPause
05-25 13:05:26.694 INFO [c$j onPermissionGranted]
✅ LocationAuthorization: Permission granted
05-25 13:05:26.747 DEBUG [HttpService startMonitoringConnectivityChanges]
🎾 Start monitoring connectivity changes
05-25 13:05:26.756 DEBUG [DeviceSettings startMonitoringPowerSaveChanges]
🎾 Start monitoring powersave changes
05-25 13:05:26.775 INFO [HeartbeatService stop]
🔴 Stop heartbeat
05-25 13:05:26.783 DEBUG [TrackingService changePace]
⚠️ Waiting for existing motionchange request #4 to complete
05-25 13:05:26.785 DEBUG [c h]
ℹ️ LocationAuthorization: Permission granted
05-25 13:05:26.787 INFO [TrackingService changePace]
🔵 setPace: false → false
05-25 13:05:26.788 DEBUG [c h]
ℹ️ LocationAuthorization: Permission granted
05-25 13:05:26.791 INFO [TSProviderManager handleProviderChangeEvent]
╔═════════════════════════════════════════════
║ Location-provider change: true
╠═════════════════════════════════════════════
╟─ GPS: true
╟─ Network: true
╟─ AP Mode: false
05-25 13:05:26.794 DEBUG [HttpService a]
╔═════════════════════════════════════════════
║ 📶 Connectivity change: connected? true
╠═════════════════════════════════════════════
05-25 13:05:26.870 DEBUG [LifecycleManager onResume] ☯️ onResume
05-25 13:05:26.944 DEBUG [TSConfig d] ℹ️ Persist config, dirty: [isMoving]
05-25 13:05:26.950 INFO [HeartbeatService stop]
🔴 Stop heartbeat
05-25 13:05:27.084 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:05:27.086 ERROR [LocationRequestService handleStartAction]
‼️ Failed to find SingleLocationRequest in START action; requestId: 4; Intent: Intent { act=start cmp=com.oiroapp.oiro/com.transistorsoft.locationmanager.service.LocationRequestService (has extras) }
05-25 13:05:27.087 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:05:27.088 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:05:27.162 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 0]
05-25 13:05:27.166 INFO [SingleLocationRequest startUpdatingLocation]
🔵 [SingleLocationRequest start, action: 3, requestId: 5]
05-25 13:05:27.182 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: true]
05-25 13:05:27.184 DEBUG [c h]
ℹ️ LocationAuthorization: Permission granted
05-25 13:05:27.184 INFO [TrackingService changePace]
🔵 setPace: false → true
05-25 13:05:27.310 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:05:27.315 INFO [TrackingService handleMotionChangeResult]
╔═════════════════════════════════════════════
║ TrackingService motionchange: true
╠═════════════════════════════════════════════
05-25 13:05:27.316 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:05:27.328 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:05:27.423 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
05-25 13:05:27.509 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 0]
05-25 13:05:27.514 INFO [SingleLocationRequest startUpdatingLocation]
🔵 [SingleLocationRequest start, action: 1, requestId: 6]
05-25 13:05:27.518 INFO [ActivityRecognitionService start]
🎾 Start motion-activity updates
05-25 13:05:27.537 DEBUG [TSLocationManagerActivity execute] locationsettings
05-25 13:05:27.538 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
05-25 13:05:27.540 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: true]
05-25 13:05:27.578 DEBUG [TSLocationManagerActivity execute] locationsettings
05-25 13:05:27.579 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
05-25 13:05:27.602 DEBUG [AbstractService onDestroy]
🔴 LocationRequestService stopped
05-25 13:05:27.647 DEBUG [TSLocationManagerActivity stop] eventCount: 1
05-25 13:05:27.648 DEBUG [TSLocationManagerActivity stop] eventCount: 0
05-25 13:05:27.739 DEBUG [TSLocationManagerActivity onDestroy]
05-25 13:05:28.701 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:05:28.705 INFO [LocationRequestService handleLocationResult]
╔═════════════════════════════════════════════
║ motionchange LocationResult: 6
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544111,-54,654483 hAcc=20 et=+2h16m2s736ms alt=103.20000457763672 vAcc=18 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=516]}], age: 136ms, time: 1685030728568
05-25 13:05:28.714 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired motionchange position, isMoving: true
05-25 13:05:28.715 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 20.0
05-25 13:05:28.718 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 2]
05-25 13:05:28.722 INFO [LocationRequestService handleLocationResult]
╔═════════════════════════════════════════════
║ providerchange LocationResult: 5
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544111,-54,654483 hAcc=20 et=+2h16m2s736ms alt=103.20000457763672 vAcc=18 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=516]}], age: 153ms, time: 1685030728568
05-25 13:05:28.734 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:05:28.744 INFO [TSLocationManager requestLocationUpdates]
🎾 Location-services: ON
05-25 13:05:28.745 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
05-25 13:05:28.748 DEBUG [AbstractService onDestroy]
🔴 LocationRequestService stopped
05-25 13:05:28.749 DEBUG [LocationRequestService handleLocationResult] SingleLocationRequest 6 isFinished? true
05-25 13:05:28.755 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired providerchange position
05-25 13:05:28.756 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 20.0
05-25 13:05:28.761 INFO [ActivityRecognitionService start]
🎾 Start motion-activity updates
05-25 13:05:28.762 INFO [b persist]
✅ INSERT: 9221dac1-0ff2-47ad-bdba-6e9b503f96ae
05-25 13:05:28.764 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:05:28.772 DEBUG [LocationRequestService handleLocationResult] SingleLocationRequest 5 isFinished? true
05-25 13:05:28.773 DEBUG [TSLocationManager$b onLocation]
ℹ️ Distance from last location: 40.435722
05-25 13:05:28.774 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:05:28.786 INFO [b persist]
✅ INSERT: f6f84c2a-a161-4a5f-a1bc-d6b5d650ba94
05-25 13:05:28.850 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:05:28.856 DEBUG [TrackingService handleLocationResult]
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544111,-54,654483 hAcc=20 et=+2h16m2s736ms alt=103.20000457763672 vAcc=18 sAcc=??? bAcc=??? {Bundle[mParcelledData.dataSize=516]}]
╟─ Age: 285ms, time: 1685030728568
05-25 13:05:28.857 DEBUG [TSLocationManager onLocationResult]
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════
05-25 13:05:28.858 DEBUG [TSLocationManager onLocationResult]
ℹ️ IGNORED: same as last location
05-25 13:05:28.858 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:05:28.980 DEBUG [TSConfig d] ℹ️ Persist config, dirty: [notification, notification.title, notification.text]
05-25 13:05:37.463 INFO [ScheduleEvent onOneShot]
╔═════════════════════════════════════════════
║ ⏰ OneShot event fired: TERMINATE_EVENT
╠═════════════════════════════════════════════
05-25 13:05:37.465 DEBUG [TerminateEvent$a a]
ℹ️ TERMINATE_EVENT ignored (MainActivity is still active).
05-25 13:05:37.694 DEBUG [AbstractService start]
🎾 ActivityRecognitionService [eventCount: 1]
05-25 13:05:37.699 DEBUG [ActivityRecognitionService handleActivityRecognitionResult]
🚘 ️DetectedActivity [type=STILL, confidence=38]
05-25 13:05:37.722 DEBUG [AbstractService finish] ⚙️︎ finish ActivityRecognitionService [eventCount: 0, sticky: false]
05-25 13:05:37.747 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:05:37.754 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
05-25 13:05:37.766 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:05:38.728 DEBUG [AbstractService onDestroy]
🔴 ActivityRecognitionService stopped
05-25 13:06:25.129 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:06:25.134 DEBUG [TrackingService handleLocationResult]
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544032,-54,654415 hAcc=8 et=+2h16m59s229ms alt=103.20000457763672 vel=0.6453751 bear=12.091115 vAcc=14 sAcc=20 bAcc=10 {Bundle[mParcelledData.dataSize=400]}]
╟─ Age: 71ms, time: 1685030785060
05-25 13:06:25.136 DEBUG [TSLocationManager onLocationResult]
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════
05-25 13:06:25.137 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 11.552025, apparent speed: 0.20448595
05-25 13:06:25.137 INFO [TrackingService performStopDetection]
ℹ️ Distance from stoppedAtLocation: -16.113976
05-25 13:06:25.138 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 20.0
05-25 13:06:25.139 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:06:25.152 INFO [b persist]
✅ INSERT: b1c4c908-7b29-405e-8c92-fcdea57786b9
05-25 13:06:29.107 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:06:29.112 DEBUG [TrackingService handleLocationResult]
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,543991,-54,654329 hAcc=5 et=+2h17m3s206ms alt=103.20000457763672 vel=1.77743 bear=58.584293 vAcc=10 sAcc=20 bAcc=10 {Bundle[mParcelledData.dataSize=400]}]
╟─ Age: 72ms, time: 1685030789038
05-25 13:06:29.115 DEBUG [TSLocationManager onLocationResult]
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════
05-25 13:06:29.117 INFO [TrackingService performStopDetection]
ℹ️ Distance from stoppedAtLocation: -3.5254078
05-25 13:06:29.118 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 10.523973, apparent speed: 2.6468747
05-25 13:06:29.119 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 20.0
05-25 13:06:29.119 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:06:29.120 DEBUG [TSLocationManager incrementOdometer] Odometer: 21.616592
05-25 13:06:29.139 INFO [b persist]
✅ INSERT: e0afc0f3-9fbc-4920-82e2-869e9bed0157
05-25 13:06:37.772 DEBUG [AbstractService start]
🎾 ActivityRecognitionService [eventCount: 1]
05-25 13:06:37.779 DEBUG [ActivityRecognitionService handleActivityTransitionResult] *** wasMoving: true, nowMoving: true, startedMoving: false, justStopped; false
05-25 13:06:37.784 INFO [TSScheduleManager cancelOneShot]
⏰ Cancel OneShot: STOP_TIMEOUT
05-25 13:06:37.789 INFO [HeartbeatService stop]
🔴 Stop heartbeat
05-25 13:06:37.803 DEBUG [c h]
ℹ️ LocationAuthorization: Permission granted
05-25 13:06:37.804 INFO [TrackingService changePace]
🔵 setPace: true → true
05-25 13:06:37.805 INFO [ActivityRecognitionService handleActivityTransitionResult]
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🔴 EXIT: still
╟─ 🎾 ENTER: walking
╚═════════════════════════════════════════════
05-25 13:06:37.807 DEBUG [AbstractService finish] ⚙️︎ finish ActivityRecognitionService [eventCount: 0, sticky: false]
05-25 13:06:37.814 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:06:37.817 INFO [TrackingService handleMotionChangeResult]
╔═════════════════════════════════════════════
║ TrackingService motionchange: true
╠═════════════════════════════════════════════
05-25 13:06:37.820 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:06:37.860 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:06:37.864 INFO [SingleLocationRequest startUpdatingLocation]
🔵 [SingleLocationRequest start, action: 1, requestId: 7]
05-25 13:06:37.870 INFO [ActivityRecognitionService start]
🎾 Start motion-activity updates
05-25 13:06:37.873 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: true]
05-25 13:06:38.062 DEBUG [AbstractService onDestroy]
🔴 ActivityRecognitionService stopped
05-25 13:06:38.158 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:06:38.163 INFO [LocationRequestService handleLocationResult]
╔═════════════════════════════════════════════
║ motionchange LocationResult: 7
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544010,-54,654339 hAcc=4 et=+2h17m12s229ms alt=103.20000457763672 vel=0.93031746 bear=231.25777 vAcc=17 sAcc=20 bAcc=10 {Bundle[mParcelledData.dataSize=400]}], age: 100ms, time: 1685030798061
05-25 13:06:38.170 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired motionchange position, isMoving: true
05-25 13:06:38.171 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 20.0
05-25 13:06:38.183 INFO [TSLocationManager removeLocationUpdates]
🔴 Location-services: OFF
05-25 13:06:38.190 INFO [TSLocationManager requestLocationUpdates]
🎾 Location-services: ON
05-25 13:06:38.192 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
05-25 13:06:38.196 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:06:38.199 DEBUG [LocationRequestService handleLocationResult] SingleLocationRequest 7 isFinished? true
05-25 13:06:38.201 INFO [ActivityRecognitionService start]
🎾 Start motion-activity updates
05-25 13:06:38.208 DEBUG [AbstractService onDestroy]
🔴 LocationRequestService stopped
05-25 13:06:38.212 INFO [b persist]
✅ INSERT: 7b1d4355-768d-44e2-b0fb-f3c428528761
05-25 13:06:38.216 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:06:38.268 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:06:38.274 DEBUG [TrackingService handleLocationResult]
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544010,-54,654339 hAcc=4 et=+2h17m12s229ms alt=103.20000457763672 vel=0.93031746 bear=231.25777 vAcc=17 sAcc=20 bAcc=10 {Bundle[mParcelledData.dataSize=400]}]
╟─ Age: 210ms, time: 1685030798061
05-25 13:06:38.276 DEBUG [TSLocationManager onLocationResult]
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════
05-25 13:06:38.278 DEBUG [TSLocationManager onLocationResult]
ℹ️ IGNORED: same as last location
05-25 13:06:38.283 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:06:50.152 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:06:50.158 DEBUG [TrackingService handleLocationResult]
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544035,-54,654427 hAcc=4 et=+2h17m24s229ms alt=103.20000457763672 vel=0.7818522 bear=269.99 vAcc=17 sAcc=20 bAcc=10 {Bundle[mParcelledData.dataSize=400]}]
╟─ Age: 94ms, time: 1685030810061
05-25 13:06:50.160 DEBUG [TSLocationManager onLocationResult]
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════
05-25 13:06:50.161 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 10.20146, apparent speed: 0.8501925
05-25 13:06:50.163 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 13.833
05-25 13:06:50.167 DEBUG [TSLocationManager incrementOdometer] Odometer: 33.518353
05-25 13:06:50.182 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:06:50.183 INFO [b persist]
✅ INSERT: f22e2e8d-5b53-410d-ba61-e9c877024b01
05-25 13:06:54.997 DEBUG [AbstractService start]
🎾 ActivityRecognitionService [eventCount: 1]
05-25 13:06:54.999 DEBUG [ActivityRecognitionService handleActivityRecognitionResult]
🚘 ️DetectedActivity [type=ON_FOOT, confidence=96]
05-25 13:06:55.003 DEBUG [AbstractService finish] ⚙️︎ finish ActivityRecognitionService [eventCount: 0, sticky: false]
05-25 13:06:55.166 DEBUG [AbstractService start]
🎾 ActivityRecognitionService [eventCount: 1]
05-25 13:06:55.171 DEBUG [ActivityRecognitionService handleActivityTransitionResult] *** wasMoving: true, nowMoving: true, startedMoving: false, justStopped; false
05-25 13:06:55.171 INFO [ActivityRecognitionService handleActivityTransitionResult]
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🎾 ENTER: walking
╚═════════════════════════════════════════════
05-25 13:06:55.175 DEBUG [AbstractService finish] ⚙️︎ finish ActivityRecognitionService [eventCount: 0, sticky: false]
05-25 13:06:55.428 DEBUG [AbstractService onDestroy]
🔴 ActivityRecognitionService stopped
05-25 13:07:28.137 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:07:28.143 DEBUG [TrackingService handleLocationResult]
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544070,-54,654513 hAcc=5 et=+2h18m2s232ms alt=103.20000457763672 vel=0.01230856 vAcc=17 sAcc=20 bAcc=??? {Bundle[mParcelledData.dataSize=400]}]
╟─ Age: 76ms, time: 1685030848063
05-25 13:07:28.144 DEBUG [TSLocationManager onLocationResult]
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════
05-25 13:07:28.146 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 10.342243, apparent speed: 0.27214998
05-25 13:07:28.147 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 7.666
05-25 13:07:28.149 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:07:28.150 DEBUG [TSLocationManager incrementOdometer] Odometer: 43.860596
05-25 13:07:28.167 INFO [b persist]
✅ INSERT: 37823193-a4c9-4827-b3d1-968985f2c40f
05-25 13:07:54.789 DEBUG [AbstractService start]
🎾 ActivityRecognitionService [eventCount: 1]
05-25 13:07:54.794 DEBUG [ActivityRecognitionService handleActivityTransitionResult] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true
05-25 13:07:54.797 INFO [ActivityRecognitionService handleActivityTransitionResult]
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🔴 EXIT: walking
╟─ 🎾 ENTER: still
╚═════════════════════════════════════════════
05-25 13:07:54.798 DEBUG [AbstractService finish] ⚙️︎ finish ActivityRecognitionService [eventCount: 0, sticky: false]
05-25 13:07:54.811 DEBUG [AbstractService start]
🎾 TrackingService [eventCount: 1]
05-25 13:07:54.818 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
05-25 13:07:54.828 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
05-25 13:07:55.053 DEBUG [AbstractService onDestroy]
🔴 ActivityRecognitionService stopped
05-25 13:08:33.145 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
05-25 13:08:33.836 DEBUG [LifecycleManager onPause] ☯️ onPause
05-25 13:08:33.839 DEBUG [LifecycleManager onStop] ☯️ onStop
05-25 13:09:56.258 DEBUG [LifecycleManager onStart] ☯️ onStart
05-25 13:09:56.302 DEBUG [LifecycleManager onResume] ☯️ onResume
05-25 13:09:56.320 INFO [ScheduleEvent onOneShot]
╔═════════════════════════════════════════════
║ ⏰ OneShot event fired: TERMINATE_EVENT
╠═════════════════════════════════════════════
05-25 13:09:56.322 DEBUG [TerminateEvent$a a]
ℹ️ TERMINATE_EVENT ignored (MainActivity is still active).
05-25 13:10:02.090 INFO [TSLocationManager setOdometer]
ℹ️ setOdometer: 0.0, isMoving: true
05-25 13:10:02.091 DEBUG [TSLocationManager clearLastOdometerLocation]
ℹ️ Clear last odometer location
05-25 13:10:02.094 INFO [TSScheduleManager cancelOneShot]
⏰ Cancel OneShot: STOP_TIMEOUT
05-25 13:10:02.099 DEBUG [c h]
ℹ️ LocationAuthorization: Permission granted
05-25 13:10:02.104 DEBUG [TSConfig d] ℹ️ Persist config, dirty: [isMoving]
05-25 13:10:02.110 INFO [TSLocationManager removeLocationUpdates]
🔴 Location-services: OFF
05-25 13:10:02.111 DEBUG [TSLocationManager clearLastOdometerLocation]
ℹ️ Clear last odometer location
05-25 13:10:02.113 INFO [ActivityRecognitionService stop]
🔴 Stop motion-activity updates
05-25 13:10:02.113 DEBUG [TSGeofenceManager d] ℹ️ Persist monitored geofences: []
05-25 13:10:02.114 DEBUG [TSGeofenceManager f]
🔴 Stop monitoring geofences
05-25 13:10:02.115 INFO [HeartbeatService stop]
🔴 Stop heartbeat
05-25 13:10:02.122 DEBUG [HttpService stopMonitoringConnectivityChanges]
🔴 Stop monitoring connectivity changes
05-25 13:10:02.125 DEBUG [DeviceSettings stopMonitoringPowerSaveChanges]
🔴 Stop monitoring powersave changes
05-25 13:10:02.156 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:10:02.157 INFO [SingleLocationRequest startUpdatingLocation]
🔵 [SingleLocationRequest start, action: 2, requestId: 8]
05-25 13:10:02.160 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: true]
05-25 13:10:02.173 DEBUG [AbstractService finish] ⚙️︎ finish TrackingService [eventCount: 0, sticky: false]
05-25 13:10:02.245 DEBUG [AbstractService onDestroy]
🔴 TrackingService stopped
05-25 13:10:03.140 DEBUG [AbstractService start]
🎾 LocationRequestService [eventCount: 1]
05-25 13:10:03.145 INFO [LocationRequestService handleLocationResult]
╔═════════════════════════════════════════════
║ getCurrentPosition LocationResult: 8
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -2,544067,-54,654524 hAcc=4 et=+2h20m37s229ms alt=102.0 vel=0.4163562 bear=4.97519 vAcc=100 sAcc=20 bAcc=10 {Bundle[mParcelledData.dataSize=400]}], age: 82ms, time: 1685031003061
05-25 13:10:03.152 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired current position
05-25 13:10:03.154 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 6.133
05-25 13:10:03.172 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:10:03.175 DEBUG [LocationRequestService handleLocationResult] SingleLocationRequest 8 isFinished? true
05-25 13:10:03.176 DEBUG [AbstractService finish] ⚙️︎ finish LocationRequestService [eventCount: 0, sticky: false]
05-25 13:10:03.267 DEBUG [AbstractService onDestroy]
🔴 LocationRequestService stopped
05-25 13:10:17.197 DEBUG [TSLocationManager clearLastOdometerLocation]
ℹ️ Clear last odometer location
05-25 13:10:17.199 INFO [ActivityRecognitionService stop]
🔴 Stop motion-activity updates
05-25 13:10:17.199 DEBUG [TSGeofenceManager d] ℹ️ Persist monitored geofences: []
05-25 13:10:17.200 DEBUG [TSGeofenceManager f]
🔴 Stop monitoring geofences
05-25 13:10:17.202 INFO [HeartbeatService stop]
🔴 Stop heartbeat
05-25 13:10:17.205 DEBUG [HttpService stopMonitoringConnectivityChanges]
🔴 Stop monitoring connectivity changes
That looks like a device hanging around the same location for a period of time (eg inside a house or office)
go outside for a much longer test (eg 5km)
That makes sense. Maybe if I stop listening for location updates if the user location is still that will not happen anymore. I acctually think that happened because I had disableStopDetection: true
for some reason. Anyway, I'll be testing outside today and see if there's a problem.
With disableStopDetection: false
(default), I was able to avoid this behaviour. In my case it was disabled because of a very specific need, that beeing the "pause" button in this app not supposed to be automatically pausing if the user was still. I was able to find a alternative implementation that fits this use case.