transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
647 stars 239 forks source link

Android 14 schedule does not *appear* to be firing with scheduleUseAlarmManager: false and a few minutes to spare #1123

Closed neiljaywarner closed 1 year ago

neiljaywarner commented 1 year ago

Your Environment


## Expected Behavior
emailed logs show the device waking up at 3:59pm and tracker.transistorsoft.com showing locations *before* app open

## Actual Behavior
Locations are not recorded till 4:43pm central when the app is opened. in realtime

## Steps to Reproduce
<!--- reproduce this issue; include code to reproduce, if relevant -->
1.
2.
3.
4.

## Context
Test schedule feature with inexact alarms on android 14

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

``` <!-- syntax-highligting:  DO NOT REMOVE -->

09-18 15:53:30.402 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, debug, desiredAccuracy, enableHeadless, heartbeatInterval, logLevel, schedule, startOnBoot, stopOnTerminate]
09-18 15:53:30.444 INFO [TSScheduleManager start] 
╔═════════════════════════════════════════════
║ 🎾  Scheduler ON
╠═════════════════════════════════════════════
╟─ Schedule[09:45-10:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[11:45-12:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[13:45-14:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[15:59-16:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[17:45-18:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[20:05-20:55, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[21:45-23:05, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╚═════════════════════════════════════════════
09-18 15:53:30.444 DEBUG [TSScheduleManager a] 
  📅  Day #2: Searching schedule for alarms...
09-18 15:53:30.447 INFO [TSScheduleManager a] 
  📅  Scheduled Alarm: ON at 15:59 on Monday
09-18 15:53:30.447 DEBUG [TSScheduleManager a] 
  ℹ️  JobScheduler triggerDelay: 329553
09-18 15:53:33.279 INFO [LocationAuthorization withBackgroundPermission] 
  🔵  LocationAuthorization: Requesting Background permission
09-18 15:53:34.055 DEBUG [LifecycleManager onPause] ☯️  onPause
09-18 15:53:35.480 INFO [LocationAuthorization$j onPermissionGranted] 
  ✅  LocationAuthorization: Permission granted
09-18 15:53:35.506 INFO [LocationAuthorization d] 
  🔵  Should show backgroundPermissionRationale? true
09-18 15:53:35.519 DEBUG [LifecycleManager onResume] ☯️  onResume
09-18 15:53:35.735 DEBUG [TSLocationManagerActivity a] android.permission.ACCESS_BACKGROUND_LOCATION
09-18 15:53:37.057 DEBUG [TSLocationManagerActivity c] eventCount: 0
09-18 15:53:37.149 DEBUG [TSLocationManagerActivity onDestroy] 
09-18 15:53:37.844 DEBUG [LifecycleManager onPause] ☯️  onPause
09-18 15:53:37.846 DEBUG [LifecycleManager onStop] ☯️  onStop
09-18 15:53:38.565 DEBUG [LifecycleManager onStart] ☯️  onStart
09-18 15:53:38.612 INFO [LocationAuthorization$j onPermissionGranted] 
  ✅  LocationAuthorization: Permission granted
09-18 15:53:38.615 INFO [TSGeofenceManager start] 
  🎾  Start monitoring geofences
09-18 15:53:38.618 DEBUG [HttpService startMonitoringConnectivityChanges] 
  🎾  Start monitoring connectivity changes
09-18 15:53:38.622 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 
  🎾  Start monitoring powersave changes
09-18 15:53:38.624 INFO [ActivityRecognitionService start] 
  🎾  Start motion-activity updates
09-18 15:53:38.625 DEBUG [LifecycleManager onResume] ☯️  onResume
09-18 15:53:38.628 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

09-18 15:53:38.631 INFO [HeartbeatService start] 
  🎾  Start heartbeat (60s)
09-18 15:53:38.635 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: HEARTBEAT in 60000ms (jobID: -1307475748)
09-18 15:53:38.636 INFO [HeartbeatService start] 
  🎾  Start heartbeat (60s)
09-18 15:53:38.638 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: HEARTBEAT
09-18 15:53:38.642 INFO [TrackingService changePace] 
  🔵  setPace: false → false
09-18 15:53:38.650 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: HEARTBEAT in 60000ms (jobID: -1307475748)
09-18 15:53:38.656 INFO [TrackingService changePace] 
  🔵  setPace: false → false
09-18 15:53:38.657 INFO [TSProviderManager a] 
╔═════════════════════════════════════════════
║ Location-provider change: true
╠═════════════════════════════════════════════
╟─ GPS: true
╟─ Network: true
╟─ AP Mode: false

09-18 15:53:38.659 DEBUG [HttpService a] 
╔═════════════════════════════════════════════
║ 📶  Connectivity change: connected? true
╠═════════════════════════════════════════════

09-18 15:53:38.665 WARN [TSLocationManager onSingleLocationResult] 
  ℹ️  Failed to find SingleLocationRequest.  Request ignored.
09-18 15:53:38.668 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 2 (176452ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.018662,-96.881994 hAcc=16.838 et=+3d8h25m42s629ms alt=147.67459024135934 vAcc=1.5062507 vel=0.33660534 sAcc=20.0 bear=197.74594], time: 1695070242215

09-18 15:53:38.700 DEBUG [TSLocationManager a] Median accuracy: 16.838
09-18 15:53:38.733 DEBUG [LocationAuthorization withPermission] 
  ℹ️  LocationAuthorization: Permission granted
09-18 15:53:38.736 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ providerchange LocationResult: 3 (176520ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.018662,-96.881994 hAcc=16.838 et=+3d8h25m42s629ms alt=147.67459024135934 vAcc=1.5062507 vel=0.33660534 sAcc=20.0 bear=197.74594], time: 1695070242215

09-18 15:53:38.736 DEBUG [TSLocationManager a] Median accuracy: 16.838
09-18 15:53:38.740 DEBUG [LocationAuthorization withPermission] 
  ℹ️  LocationAuthorization: Permission granted
09-18 15:53:38.757 DEBUG [ForegroundNotification createNotificationChannel] NotificationChannel{mId='com.transistorsoft.flutterbackgroundgeolocationexampleTSLocationManager', mName=TSLocationManager, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=-1000, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}
09-18 15:53:38.769 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 1, eventCount: 1]
09-18 15:53:38.770 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 1, requestId: 2]
09-18 15:53:38.772 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 1, eventCount: 1, sticky: true]
09-18 15:53:38.772 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 3, requestId: 3]
09-18 15:53:38.772 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 2, eventCount: 1]
09-18 15:53:38.776 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: true]
09-18 15:53:38.805 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 1, eventCount: 1]
09-18 15:53:38.812 DEBUG [ActivityRecognitionService a] 
  🚘 ️DetectedActivity [type=UNKNOWN, confidence=41]
09-18 15:53:38.820 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false]
09-18 15:53:38.839 DEBUG [TSLocationManagerActivity a] locationsettings
09-18 15:53:38.839 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
09-18 15:53:38.881 DEBUG [TSLocationManagerActivity c] eventCount: 0
09-18 15:53:38.889 DEBUG [TSLocationManagerActivity a] locationsettings
09-18 15:53:38.890 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
09-18 15:53:38.897 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 2, eventCount: 1]
09-18 15:53:38.898 DEBUG [ActivityRecognitionService a] *** wasMoving: false, nowMoving: true, startedMoving: true, justStopped; false
09-18 15:53:38.903 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [isMoving]
09-18 15:53:38.904 DEBUG [TSLocationManagerActivity c] eventCount: 0
09-18 15:53:38.912 INFO [HeartbeatService stop] 
  🔴  Stop heartbeat
09-18 15:53:38.913 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: HEARTBEAT
09-18 15:53:38.915 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 3, eventCount: 2]
09-18 15:53:38.918 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true
09-18 15:53:38.919 DEBUG [TrackingService changePace] 
  ⚠️  Waiting for existing motionchange request #2 to complete
09-18 15:53:38.919 INFO [ActivityRecognitionService a] 
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🔴  EXIT: walking
╟─ 🎾  ENTER: still
╚═════════════════════════════════════════════
09-18 15:53:38.919 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 3, eventCount: 1, sticky: false]
09-18 15:53:38.924 INFO [TrackingService changePace] 
  🔵  setPace: false → true
09-18 15:53:38.924 INFO [ActivityRecognitionService a] 
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🎾  ENTER: walking
╚═════════════════════════════════════════════
09-18 15:53:38.924 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false]
09-18 15:53:38.956 DEBUG [TSLocationManagerActivity onDestroy] 
09-18 15:53:38.975 DEBUG [AbstractService a] 
  🎾  START [TrackingService  startId: 1, eventCount: 1]
09-18 15:53:38.976 INFO [TrackingService k] 
╔═════════════════════════════════════════════
║ TrackingService motionchange: true
╠═════════════════════════════════════════════

09-18 15:53:38.976 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 1, eventCount: 0, sticky: true]
09-18 15:53:38.985 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 4 (176769ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.018662,-96.881994 hAcc=16.838 et=+3d8h25m42s629ms alt=147.67459024135934 vAcc=1.5062507 vel=0.33660534 sAcc=20.0 bear=197.74594], time: 1695070242215

09-18 15:53:38.985 DEBUG [TSLocationManager a] Median accuracy: 16.838
09-18 15:53:38.990 DEBUG [LocationAuthorization withPermission] 
  ℹ️  LocationAuthorization: Permission granted
09-18 15:53:38.998 DEBUG [AbstractService b] 
  🎾  STOP [LocationRequestService startId: 3, eventCount: 1]
09-18 15:53:38.998 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 3, eventCount: 0, sticky: false]
09-18 15:53:39.007 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 4, eventCount: 1]
09-18 15:53:39.008 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 1, requestId: 4]
09-18 15:53:39.011 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 4, eventCount: 0, sticky: true]
09-18 15:53:39.126 DEBUG [AbstractService f] 
  ⚙️︎  ActivityRecognitionService.stopSelfResult(3): true
09-18 15:53:39.127 DEBUG [AbstractService onDestroy] 
  🔴  ActivityRecognitionService stopped
09-18 15:53:39.200 DEBUG [AbstractService f] 
  ⚙️︎  LocationRequestService.stopSelfResult(4): true
09-18 15:53:39.201 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService stopped
09-18 15:53:39.666 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

09-18 15:53:39.883 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 1, eventCount: 1]
09-18 15:53:39.885 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ providerchange LocationResult: 3 (141ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.018697,-96.881982 hAcc=13.058 et=+3d8h28m40s157ms alt=144.39999389648438 vAcc=1.5961574], time: 1695070419743

09-18 15:53:39.888 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 2, eventCount: 2]
09-18 15:53:39.899 DEBUG [AbstractService b] 
  🎾  STOP [LocationRequestService startId: 3, eventCount: 3]
09-18 15:53:39.900 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 3, eventCount: 2, sticky: false]
09-18 15:53:39.912 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired providerchange position
09-18 15:53:39.913 DEBUG [TSLocationManager a] Median accuracy: 16.838
09-18 15:53:39.926 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 1, eventCount: 1, sticky: false]
09-18 15:53:39.928 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 4 (182ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.018697,-96.881982 hAcc=13.058 et=+3d8h28m40s157ms alt=144.39999389648438 vAcc=1.5961574], time: 1695070419743

09-18 15:53:39.929 DEBUG [TSLocationManager$c onLocation] 
  ℹ️  Distance from last location: 1.0656298E7
09-18 15:53:39.930 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
09-18 15:53:39.931 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
09-18 15:53:39.932 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired motionchange position, isMoving: true
09-18 15:53:39.933 INFO [SQLiteLocationDAO persist] 
  ✅  INSERT: 29e41623-5516-4236-bcc5-ab323a88912a
09-18 15:53:39.933 DEBUG [TSLocationManager a] Median accuracy: 16.838
09-18 15:53:39.936 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

09-18 15:53:39.948 INFO [TSLocationManager d] 
  🔴  Location-services: OFF
09-18 15:53:39.950 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
09-18 15:53:39.951 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
09-18 15:53:39.953 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 2, eventCount: 1, sticky: false]
09-18 15:53:39.955 INFO [SQLiteLocationDAO persist] 
  ✅  INSERT: b116dff5-0961-4b47-b3c1-61c83085c004
09-18 15:53:39.955 DEBUG [AbstractService b] 
  🎾  STOP [LocationRequestService startId: 4, eventCount: 1]
09-18 15:53:39.956 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 4, eventCount: 0, sticky: false]
09-18 15:53:39.958 INFO [HttpService flush] 
  ℹ️  HttpService is busy
09-18 15:53:39.959 INFO [ActivityRecognitionService start] 
  🎾  Start motion-activity updates
09-18 15:53:39.972 DEBUG [AbstractService a] 
  🎾  START [TrackingService  startId: 2, eventCount: 1]
09-18 15:53:39.973 DEBUG [TrackingService c] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.018697,-96.881982 hAcc=13.058 et=+3d8h28m40s157ms alt=144.39999389648438 vAcc=1.5961574]
╟─ Age: 229ms, time: 1695070419743

09-18 15:53:39.973 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 2, eventCount: 0, sticky: true]
09-18 15:53:39.973 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

09-18 15:53:39.974 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
09-18 15:53:39.990 DEBUG [AbstractService a] 
  🎾  START [TrackingService  startId: 3, eventCount: 1]
09-18 15:53:39.992 DEBUG [TrackingService c] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.018697,-96.881982 hAcc=13.058 et=+3d8h28m40s157ms alt=144.39999389648438 vAcc=1.5961574]
╟─ Age: 249ms, time: 1695070419743

09-18 15:53:39.993 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

09-18 15:53:39.994 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
09-18 15:53:39.995 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
09-18 15:53:39.996 WARN [TSScheduleManager oneShot] 
  ℹ️  Scheduling exact alarms requires android.permission.USE_EXACT_ALARM with SDK >= 34.  Oneshot using in-exact Alarm
09-18 15:53:39.998 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 3, eventCount: 0, sticky: true]
09-18 15:53:40.014 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 1
09-18 15:53:40.025 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 1, eventCount: 1]
09-18 15:53:40.026 DEBUG [ActivityRecognitionService a] 
  🚘 ️DetectedActivity [type=UNKNOWN, confidence=41]
09-18 15:53:40.029 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false]
09-18 15:53:40.033 DEBUG [SQLiteLocationDAO first] 
  ✅  Locked 1 records
09-18 15:53:40.033 INFO [HttpService a] 
  🔵  HTTP POST: 29e41623-5516-4236-bcc5-ab323a88912a
09-18 15:53:40.073 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 2, eventCount: 1]
09-18 15:53:40.074 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true
09-18 15:53:40.077 INFO [ActivityRecognitionService a] 
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🎾  ENTER: still
╚═════════════════════════════════════════════
09-18 15:53:40.077 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false]
09-18 15:53:40.080 DEBUG [AbstractService a] 
  🎾  START [TrackingService  startId: 4, eventCount: 1]
09-18 15:53:40.081 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 4, eventCount: 0, sticky: true]
09-18 15:53:40.131 INFO [HttpService$f onResponse] 
  🔵  Response: 200
09-18 15:53:40.132 DEBUG [SQLiteLocationDAO destroy] 
  ✅  DESTROY: 29e41623-5516-4236-bcc5-ab323a88912a
09-18 15:53:40.142 DEBUG [SQLiteLocationDAO first] 
  ✅  Locked 1 records
09-18 15:53:40.144 INFO [HttpService a] 
  🔵  HTTP POST: b116dff5-0961-4b47-b3c1-61c83085c004
09-18 15:53:40.159 DEBUG [AbstractService f] 
  ⚙️︎  LocationRequestService.stopSelfResult(4): true
09-18 15:53:40.159 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService stopped
09-18 15:53:40.245 INFO [HttpService$f onResponse] 
  🔵  Response: 200
09-18 15:53:40.247 DEBUG [SQLiteLocationDAO destroy] 
  ✅  DESTROY: b116dff5-0961-4b47-b3c1-61c83085c004
09-18 15:53:40.249 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 1
09-18 15:53:40.279 DEBUG [AbstractService f] 
  ⚙️︎  ActivityRecognitionService.stopSelfResult(2): true
09-18 15:53:40.280 DEBUG [AbstractService onDestroy] 
  🔴  ActivityRecognitionService stopped
09-18 15:53:40.808 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
09-18 15:53:40.813 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [isMoving]
09-18 15:53:40.838 INFO [TSLocationManager d] 
  🔴  Location-services: OFF
09-18 15:53:40.841 DEBUG [TSLocationManager a] 
  ℹ️  Clear last odometer location
09-18 15:53:40.843 DEBUG [AbstractService b] 
  🎾  STOP [TrackingService startId: 5, eventCount: 1]
09-18 15:53:40.843 DEBUG [TSGeofenceManager c] 
  🔴  Stop monitoring geofences
09-18 15:53:40.843 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 5, eventCount: 0, sticky: false]
09-18 15:53:40.843 INFO [ActivityRecognitionService stop] 
  🔴  Stop motion-activity updates
09-18 15:53:40.846 INFO [HeartbeatService stop] 
  🔴  Stop heartbeat
09-18 15:53:40.848 DEBUG [HttpService stopMonitoringConnectivityChanges] 
  🔴  Stop monitoring connectivity changes
09-18 15:53:40.851 DEBUG [DeviceSettings stopMonitoringPowerSaveChanges] 
  🔴  Stop monitoring powersave changes
09-18 15:53:41.046 DEBUG [AbstractService f] 
  ⚙️︎  TrackingService.stopSelfResult(5): true
09-18 15:53:41.047 DEBUG [AbstractService onDestroy] 
  🔴  TrackingService stopped
09-18 15:53:45.295 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: location
09-18 15:53:45.297 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: motionchange
09-18 15:53:45.299 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: activitychange
09-18 15:53:45.301 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: geofence
09-18 15:53:45.302 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: heartbeat
09-18 15:53:45.308 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: http
09-18 15:53:45.317 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: schedule
09-18 15:53:45.320 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: connectivitychange
09-18 15:53:45.326 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: enabledchange
09-18 15:53:45.327 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: providerchange
09-18 15:53:45.329 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: powersavechange
09-18 15:53:45.331 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: notificationaction
09-18 15:53:45.332 DEBUG [LifecycleManager setHeadless] 
╔═════════════════════════════════════════════
║ ☯️  HeadlessMode? true
╠═════════════════════════════════════════════

09-18 15:53:45.333 DEBUG [BackgroundGeolocation a] 
  🔴  Cleared callbacks
09-18 15:53:45.335 INFO [BackgroundGeolocation e] 
╔═════════════════════════════════════════════
║ MainActivity was destroyed
╠═════════════════════════════════════════════
╟─ stopOnTerminate: false
╟─ enabled: false

09-18 16:43:48.761 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/location
09-18 16:43:48.762 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/motionchange
09-18 16:43:48.762 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/activitychange
09-18 16:43:48.762 DEBUG [TSSQLiteAppender$c run] 
  ℹ️  Cleared logs older than 72 hours
09-18 16:43:48.762 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/geofenceschange
09-18 16:43:48.763 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/geofence
09-18 16:43:48.763 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/heartbeat
09-18 16:43:48.763 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/http
09-18 16:43:48.763 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/schedule
09-18 16:43:48.764 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/connectivitychange
09-18 16:43:48.764 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/enabledchange
09-18 16:43:48.765 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/providerchange
09-18 16:43:48.765 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/powersavechange
09-18 16:43:48.766 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/notificationaction
09-18 16:43:48.766 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/authorization
09-18 16:43:48.766 INFO [LoggerFacade$a a] 
  ✅  Google Play Services: connected (version code:12451000)
09-18 16:43:48.767 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ TSLocationManager version: 3.4.5 (427)
╠═════════════════════════════════════════════
╟─ Google Pixel 6 @ 14 (flutter)
{
  "activityRecognitionInterval": 10000,
  "allowIdenticalLocations": false,
  "authorization": {
    "strategy": "jwt",
    "accessToken": "eyJhb<redacted>",
    "refreshToken": "acf6d<redacted>",
    "refreshUrl": "https:\/\/tracker.transistorsoft.com\/api\/refresh_token",
    "refreshPayload": {
      "refresh_token": "{refreshToken}"
    },
    "refreshHeaders": {
      "Authorization": "Bearer {accessToken}"
    },
    "expires": -1
  },
  "autoSync": true,
  "autoSyncThreshold": 0,
  "backgroundPermissionRationale": {
    "title": "Allow {applicationName} to access this device's location even when the app is closed or not in use.",
    "message": "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
    "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"",
    "negativeAction": "Cancel"
  },
  "batchSync": false,
  "configUrl": "",
  "debug": true,
  "deferTime": 0,
  "desiredAccuracy": -2,
  "desiredOdometerAccuracy": 100,
  "disableAutoSyncOnCellular": false,
  "disableElasticity": false,
  "disableLocationAuthorizationAlert": false,
  "disableMotionActivityUpdates": false,
  "disableProviderChangeRecord": false,
  "disableStopDetection": false,
  "distanceFilter": 10,
  "elasticityMultiplier": 1,
  "enableHeadless": true,
  "enableTimestampMeta": false,
  "extras": {},
  "fastestLocationUpdateInterval": -1,
  "foregroundService": true,
  "geofenceInitialTriggerEntry": true,
  "geofenceModeHighAccuracy": false,
  "geofenceProximityRadius": 1000,
  "geofenceTemplate": "",
  "headers": {},
  "headlessJobService": "com.transistorsoft.flutter.backgroundgeolocation.HeadlessTask",
  "heartbeatInterval": 60,
  "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",
    "channelId": "",
    "smallIcon": "",
    "largeIcon": "",
    "priority": -1,
    "sticky": false,
    "strings": {},
    "actions": []
  },
  "params": {},
  "persist": true,
  "persistMode": 2,
  "schedule": [
    "1-7 9:45-10:45",
    "1-7 11:45-12:45",
    "1-7 13:45-14:45",
    "1-7 15:59-16:45",
    "1-7 17:45-18:45",
    "1-7 20:05-20:55",
    "1-7 21:45-23:05"
  ],
  "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:\/\/tracker.transistorsoft.com\/api\/locations",
  "useSignificantChangesOnly": false,
  "enabled": false,
  "schedulerEnabled": true,
  "trackingMode": 1,
  "odometer": 0,
  "isFirstBoot": false,
  "didLaunchInBackground": false,
  "didDeviceReboot": false
}
09-18 16:43:48.767 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅  ACCELEROMETER: {Sensor name="LSM6DSR Accelerometer", vendor="STMicro", version=1, type=1, maxRange=156.9064, resolution=0.0047856453, power=0.001, minDelay=5000}
╟─ ✅  GYROSCOPE: {Sensor name="LSM6DSR Gyroscope", vendor="STMicro", version=1, type=4, maxRange=34.906063, resolution=0.0012217305, power=0.001, minDelay=5000}
╟─ ✅  MAGNETOMETER: {Sensor name="MMC56X3X Magnetometer", vendor="MEMSIC", version=1, type=2, maxRange=3198.1567, resolution=0.0976, power=0.001, minDelay=10000}
╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="Significant Motion (wake-up)", vendor="Google", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1}
╚═════════════════════════════════════════════
09-18 16:43:48.767 INFO [LoggerFacade$a a] 
  🎾  Start monitoring location-provider changes
09-18 16:43:48.768 DEBUG [LoggerFacade$a a] 
  🔴  Cleared callbacks
09-18 16:43:48.768 DEBUG [LoggerFacade$a a] 
  ℹ️  PRUNE -1 days
09-18 16:43:48.768 DEBUG [LoggerFacade$a a] ☯️  onCreate
09-18 16:43:48.768 DEBUG [LoggerFacade$a a] ☯️  onStart
09-18 16:43:48.769 DEBUG [LoggerFacade$a a] ☯️  onResume
09-18 16:43:48.931 DEBUG [StreamHandler onListen] http
09-18 16:43:49.409 DEBUG [StreamHandler onListen] location
09-18 16:43:49.409 DEBUG [StreamHandler onListen] motionchange
09-18 16:43:49.410 DEBUG [StreamHandler onListen] activitychange
09-18 16:43:49.410 DEBUG [StreamHandler onListen] providerchange
09-18 16:43:49.410 DEBUG [StreamHandler onListen] connectivitychange
09-18 16:43:49.411 DEBUG [StreamHandler onListen] heartbeat
09-18 16:43:49.411 DEBUG [StreamHandler onListen] geofence
09-18 16:43:49.411 DEBUG [StreamHandler onListen] schedule
09-18 16:43:49.411 DEBUG [StreamHandler onListen] powersavechange
09-18 16:43:49.412 DEBUG [StreamHandler onListen] enabledchange
09-18 16:43:49.413 DEBUG [StreamHandler onListen] notificationaction
09-18 16:43:49.420 DEBUG [TransistorAuthorizationToken$a run] 🔑 Found cached token for tracker.transistorsoft.com
09-18 16:43:49.495 DEBUG [StreamHandler onListen] geofenceschange
09-18 16:43:49.705 INFO [TSScheduleManager start] 
╔═════════════════════════════════════════════
║ 🎾  Scheduler ON
╠═════════════════════════════════════════════
╟─ Schedule[09:45-10:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[11:45-12:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[13:45-14:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[15:59-16:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[17:45-18:45, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[20:05-20:55, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╟─ Schedule[21:45-23:05, Days: [1, 2, 3, 4, 5, 6, 7], trackingMode: 1]
╚═════════════════════════════════════════════
09-18 16:43:49.705 DEBUG [TSScheduleManager a] 
  📅  Day #2: Searching schedule for alarms...
09-18 16:43:49.706 DEBUG [TSScheduleManager a] 
  📅  Scheduler says we should be ENABLED but we are NOT
09-18 16:43:49.707 INFO [TSScheduleManager a] 
  📅  Scheduled Alarm: ON at 16:43 on Monday
09-18 16:43:49.707 DEBUG [TSScheduleManager a] 
  ℹ️  JobScheduler triggerDelay: 0
09-18 16:43:49.729 DEBUG [ScheduleEvent a] 
09-18 16:43:49.730 INFO [ScheduleEvent a] 
╔═════════════════════════════════════════════
║ 📅  Schedule alarm fired!  enabled: true, trackingMode: 1
╠═════════════════════════════════════════════

09-18 16:43:49.733 WARN [TSScheduleManager start] Scheduler already started.  IGNORED
09-18 16:43:49.735 INFO [TSGeofenceManager start] 
  🎾  Start monitoring geofences
09-18 16:43:49.737 DEBUG [HttpService startMonitoringConnectivityChanges] 
  🎾  Start monitoring connectivity changes
09-18 16:43:49.742 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 
  🎾  Start monitoring powersave changes
09-18 16:43:49.745 INFO [ActivityRecognitionService start] 
  🎾  Start motion-activity updates
09-18 16:43:49.749 DEBUG [HttpService a] 
╔═════════════════════════════════════════════
║ 📶  Connectivity change: connected? true
╠═════════════════════════════════════════════

09-18 16:43:49.758 INFO [HeartbeatService start] 
  🎾  Start heartbeat (60s)
09-18 16:43:49.759 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: HEARTBEAT in 60000ms (jobID: -1307475748)
09-18 16:43:49.766 INFO [TrackingService changePace] 
  🔵  setPace: false → false
09-18 16:43:49.771 DEBUG [TSScheduleManager a] 
  📅  Day #2: Searching schedule for alarms...
09-18 16:43:49.773 INFO [TSScheduleManager a] 
  📅  Scheduled Alarm: OFF at 16:45 on Monday
09-18 16:43:49.774 DEBUG [TSScheduleManager a] 
  ℹ️  JobScheduler triggerDelay: 70226
09-18 16:43:49.776 DEBUG [HttpService startMonitoringConnectivityChanges] 
  🎾  Start monitoring connectivity changes
09-18 16:43:49.776 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 
  🎾  Start monitoring powersave changes
09-18 16:43:49.777 INFO [ActivityRecognitionService start] 
  🎾  Start motion-activity updates
09-18 16:43:49.778 INFO [HeartbeatService start] 
  🎾  Start heartbeat (60s)
09-18 16:43:49.779 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: HEARTBEAT
09-18 16:43:49.781 DEBUG [ScheduleJobService onStopJob] 
09-18 16:43:49.784 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: HEARTBEAT in 60000ms (jobID: -1307475748)
09-18 16:43:49.805 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 1 (180643ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022911,-96.884388 hAcc=21.528 et=+6m40s227ms alt=148.89999389648438 vAcc=2.8866096 vel=0.0 {Bundle[{battery_level=0.87, is_charging=false, odometer=0.0}]}], time: 1695073249162

09-18 16:43:49.940 DEBUG [TSLocationManager a] Median accuracy: 21.528
09-18 16:43:49.965 DEBUG [LocationAuthorization withPermission] 
  ℹ️  LocationAuthorization: Permission granted
09-18 16:43:49.966 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 2 (180804ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022911,-96.884388 hAcc=21.528 et=+6m40s227ms alt=148.89999389648438 vAcc=2.8866096 vel=0.0], time: 1695073249162

09-18 16:43:49.967 DEBUG [TSLocationManager a] Median accuracy: 21.528
09-18 16:43:49.970 DEBUG [LocationAuthorization withPermission] 
  ℹ️  LocationAuthorization: Permission granted
09-18 16:43:49.987 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 1, eventCount: 1]
09-18 16:43:49.991 DEBUG [ActivityRecognitionService a] 
  🚘 ️DetectedActivity [type=STILL, confidence=72]
09-18 16:43:49.996 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false]
09-18 16:43:50.036 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 1, eventCount: 1]
09-18 16:43:50.038 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 1, requestId: 1]
09-18 16:43:50.039 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 2, eventCount: 2]
09-18 16:43:50.040 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 1, requestId: 2]
09-18 16:43:50.041 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 2, eventCount: 1, sticky: true]
09-18 16:43:50.043 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: true]
09-18 16:43:50.045 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 2, eventCount: 1]
09-18 16:43:50.047 DEBUG [ActivityRecognitionService a] *** wasMoving: false, nowMoving: true, startedMoving: true, justStopped; false
09-18 16:43:50.049 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [isMoving]
09-18 16:43:50.066 DEBUG [TSLocationManagerActivity a] locationsettings
09-18 16:43:50.066 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
09-18 16:43:50.069 INFO [HeartbeatService stop] 
  🔴  Stop heartbeat
09-18 16:43:50.072 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: HEARTBEAT
09-18 16:43:50.079 INFO [ActivityRecognitionService a] 
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🎾  ENTER: in_vehicle
╚═════════════════════════════════════════════
09-18 16:43:50.079 INFO [TrackingService changePace] 
  🔵  setPace: false → true
09-18 16:43:50.079 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false]
09-18 16:43:50.085 DEBUG [TSLocationManagerActivity a] locationsettings
09-18 16:43:50.086 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
09-18 16:43:50.101 DEBUG [TSLocationManagerActivity c] eventCount: 1
09-18 16:43:50.119 DEBUG [AbstractService a] 
  🎾  START [TrackingService  startId: 1, eventCount: 1]
09-18 16:43:50.120 INFO [TrackingService k] 
╔═════════════════════════════════════════════
║ TrackingService motionchange: true
╠═════════════════════════════════════════════

09-18 16:43:50.120 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 1, eventCount: 0, sticky: true]
09-18 16:43:50.129 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 3 (180966ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022911,-96.884388 hAcc=21.528 et=+6m40s227ms alt=148.89999389648438 vAcc=2.8866096 vel=0.0], time: 1695073249162

09-18 16:43:50.129 DEBUG [TSLocationManager a] Median accuracy: 21.528
09-18 16:43:50.132 DEBUG [LocationAuthorization withPermission] 
  ℹ️  LocationAuthorization: Permission granted
09-18 16:43:50.149 DEBUG [TSLocationManagerActivity c] eventCount: 0
09-18 16:43:50.166 DEBUG [AbstractService b] 
  🎾  STOP [LocationRequestService startId: 3, eventCount: 1]
09-18 16:43:50.166 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 3, eventCount: 0, sticky: false]
09-18 16:43:50.198 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 4, eventCount: 1]
09-18 16:43:50.199 INFO [SingleLocationRequest startUpdatingLocation] 
  🔵  [SingleLocationRequest start, action: 1, requestId: 3]
09-18 16:43:50.202 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 4, eventCount: 0, sticky: true]
09-18 16:43:50.209 DEBUG [TSLocationManagerActivity onDestroy] 
09-18 16:43:50.285 DEBUG [AbstractService f] 
  ⚙️︎  ActivityRecognitionService.stopSelfResult(2): true
09-18 16:43:50.286 DEBUG [AbstractService onDestroy] 
  🔴  ActivityRecognitionService stopped
09-18 16:43:50.369 DEBUG [AbstractService f] 
  ⚙️︎  LocationRequestService.stopSelfResult(4): true
09-18 16:43:50.369 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService stopped
09-18 16:43:50.753 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════

09-18 16:43:51.099 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 1, eventCount: 1]
09-18 16:43:51.102 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 1 (158ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022773,-96.884666 hAcc=51.36 et=+9m42s8ms alt=148.89999389648438 vAcc=1.9640477 vel=0.6494149 bear=272.51007], time: 1695073430943

09-18 16:43:51.111 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 2, eventCount: 2]
09-18 16:43:51.134 DEBUG [TSLocationManager a] Median accuracy: 21.528
09-18 16:43:51.141 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 1, eventCount: 1, sticky: true]
09-18 16:43:51.143 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 3 (198ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022773,-96.884666 hAcc=51.36 et=+9m42s8ms alt=148.89999389648438 vAcc=1.9640477 vel=0.6494149 bear=272.51007], time: 1695073430943

09-18 16:43:51.145 DEBUG [TSLocationManager a] Median accuracy: 21.528
09-18 16:43:51.152 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: true]
09-18 16:43:53.031 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 3, eventCount: 1]
09-18 16:43:53.035 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 3 (349ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022834,-96.884641 hAcc=50.171 et=+9m43s750ms alt=148.89999389648438 vAcc=1.9800845 vel=1.7545017 bear=7.895378], time: 1695073432685

09-18 16:43:53.037 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired motionchange position, isMoving: true
09-18 16:43:53.038 DEBUG [TSLocationManager a] Median accuracy: 35.849503
09-18 16:43:53.041 DEBUG [AbstractService a] 
  🎾  START [LocationRequestService  startId: 4, eventCount: 2]
09-18 16:43:53.054 DEBUG [AbstractService b] 
  🎾  STOP [LocationRequestService startId: 5, eventCount: 3]
09-18 16:43:53.055 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 5, eventCount: 2, sticky: false]
09-18 16:43:53.074 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
09-18 16:43:53.076 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
09-18 16:43:53.078 INFO [ActivityRecognitionService start] 
  🎾  Start motion-activity updates
09-18 16:43:53.079 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 3, eventCount: 1, sticky: false]
09-18 16:43:53.081 INFO [TSLocationManager a] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 1 (394ms old)
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022834,-96.884641 hAcc=50.171 et=+9m43s750ms alt=148.89999389648438 vAcc=1.9800845 vel=1.7545017 bear=7.895378], time: 1695073432685

09-18 16:43:53.083 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired motionchange position, isMoving: true
09-18 16:43:53.084 DEBUG [TSLocationManager a] Median accuracy: 50.171
09-18 16:43:53.086 INFO [SQLiteLocationDAO persist] 
  ✅  INSERT: a2d03b86-ca0e-4aa9-80dd-aa50bb767cfd
09-18 16:43:53.089 INFO [HttpService flush] 
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════

09-18 16:43:53.093 INFO [TSLocationManager d] 
  🔴  Location-services: OFF
09-18 16:43:53.097 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
09-18 16:43:53.098 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
09-18 16:43:53.102 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 4, eventCount: 0, sticky: false]
09-18 16:43:53.103 INFO [SQLiteLocationDAO persist] 
  ✅  INSERT: db2ba431-ca0d-4093-bfff-0c5da27148dd
09-18 16:43:53.107 INFO [HttpService flush] 
  ℹ️  HttpService is busy
09-18 16:43:53.114 DEBUG [AbstractService a] 
  🎾  START [TrackingService  startId: 2, eventCount: 1]
09-18 16:43:53.115 INFO [TrackingService k] 
╔═════════════════════════════════════════════
║ TrackingService motionchange: true
╠═════════════════════════════════════════════

09-18 16:43:53.115 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 2, eventCount: 0, sticky: true]
09-18 16:43:53.125 DEBUG [AbstractService a] 
  🎾  START [TrackingService  startId: 3, eventCount: 1]
09-18 16:43:53.129 DEBUG [TrackingService c] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022834,-96.884641 hAcc=50.171 et=+9m43s750ms alt=148.89999389648438 vAcc=1.9800845 vel=1.7545017 bear=7.895378]
╟─ Age: 442ms, time: 1695073432685

09-18 16:43:53.131 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

09-18 16:43:53.131 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 3, eventCount: 0, sticky: true]
09-18 16:43:53.133 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
09-18 16:43:53.150 DEBUG [AbstractService b] 
  🎾  STOP [LocationRequestService startId: 6, eventCount: 1]
09-18 16:43:53.150 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [LocationRequestService startId: 6, eventCount: 0, sticky: false]
09-18 16:43:53.158 DEBUG [AbstractService a] 
  🎾  START [TrackingService  startId: 4, eventCount: 1]
09-18 16:43:53.159 DEBUG [TrackingService c] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 33.022834,-96.884641 hAcc=50.171 et=+9m43s750ms alt=148.89999389648438 vAcc=1.9800845 vel=1.7545017 bear=7.895378]
╟─ Age: 474ms, time: 1695073432685

09-18 16:43:53.160 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

09-18 16:43:53.160 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
09-18 16:43:53.162 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 60000ms (jobID: -18513055)
09-18 16:43:53.163 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 4, eventCount: 0, sticky: true]
09-18 16:43:53.168 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 1
09-18 16:43:53.172 DEBUG [SQLiteLocationDAO first] 
  ✅  Locked 1 records
09-18 16:43:53.172 INFO [HttpService a] 
  🔵  HTTP POST: a2d03b86-ca0e-4aa9-80dd-aa50bb767cfd
09-18 16:43:53.201 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 1, eventCount: 1]
09-18 16:43:53.202 DEBUG [ActivityRecognitionService a] 
  🚘 ️DetectedActivity [type=STILL, confidence=70]
09-18 16:43:53.208 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false]
09-18 16:43:53.227 DEBUG [AbstractService a] 
  🎾  START [ActivityRecognitionService  startId: 2, eventCount: 1]
09-18 16:43:53.228 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: true, startedMoving: false, justStopped; false
09-18 16:43:53.229 INFO [ActivityRecognitionService a] 
╔═════════════════════════════════════════════
║ Motion Transition Result
╠═════════════════════════════════════════════
╟─ 🎾  ENTER: in_vehicle
╚═════════════════════════════════════════════
09-18 16:43:53.229 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false]
09-18 16:43:53.354 DEBUG [AbstractService f] 
  ⚙️︎  LocationRequestService.stopSelfResult(6): true
09-18 16:43:53.355 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService stopped
09-18 16:43:53.432 DEBUG [AbstractService f] 
  ⚙️︎  ActivityRecognitionService.stopSelfResult(2): true
09-18 16:43:53.433 DEBUG [AbstractService onDestroy] 
  🔴  ActivityRecognitionService stopped
09-18 16:43:53.662 INFO [HttpService$f onResponse] 
  🔵  Response: 200
09-18 16:43:53.665 DEBUG [SQLiteLocationDAO destroy] 
  ✅  DESTROY: a2d03b86-ca0e-4aa9-80dd-aa50bb767cfd
09-18 16:43:53.671 DEBUG [SQLiteLocationDAO first] 
  ✅  Locked 1 records
09-18 16:43:53.672 INFO [HttpService a] 
  🔵  HTTP POST: db2ba431-ca0d-4093-bfff-0c5da27148dd
09-18 16:43:53.781 INFO [HttpService$f onResponse] 
  🔵  Response: 200
09-18 16:43:53.782 DEBUG [SQLiteLocationDAO destroy] 
  ✅  DESTROY: db2ba431-ca0d-4093-bfff-0c5da27148dd
09-18 16:43:53.787 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 1
09-18 16:45:14.611 DEBUG [ScheduleEvent a] 
09-18 16:45:14.614 INFO [ScheduleEvent a] 
╔═════════════════════════════════════════════
║ 📅  Schedule alarm fired!  enabled: false, trackingMode: 1
╠═════════════════════════════════════════════

09-18 16:45:14.615 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [isMoving]
09-18 16:45:14.646 INFO [TSLocationManager d] 
  🔴  Location-services: OFF
09-18 16:45:14.648 DEBUG [TSLocationManager a] 
  ℹ️  Clear last odometer location
09-18 16:45:14.649 INFO [ActivityRecognitionService stop] 
  🔴  Stop motion-activity updates
09-18 16:45:14.649 DEBUG [TSGeofenceManager c] 
  🔴  Stop monitoring geofences
09-18 16:45:14.650 INFO [HeartbeatService stop] 
  🔴  Stop heartbeat
09-18 16:45:14.651 DEBUG [HttpService stopMonitoringConnectivityChanges] 
  🔴  Stop monitoring connectivity changes
09-18 16:45:14.652 DEBUG [DeviceSettings stopMonitoringPowerSaveChanges] 
  🔴  Stop monitoring powersave changes
09-18 16:45:14.656 DEBUG [TSScheduleManager a] 
  📅  Day #2: Searching schedule for alarms...
09-18 16:45:14.657 DEBUG [AbstractService b] 
  🎾  STOP [TrackingService startId: 5, eventCount: 1]
09-18 16:45:14.657 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 5, eventCount: 0, sticky: false]
09-18 16:45:14.660 INFO [TSScheduleManager a] 
  📅  Scheduled Alarm: ON at 17:45 on Monday
09-18 16:45:14.661 DEBUG [TSScheduleManager a] 
  ℹ️  JobScheduler triggerDelay: 3585339
09-18 16:45:14.673 DEBUG [ScheduleJobService onStopJob] 
09-18 16:45:14.864 DEBUG [AbstractService f] 
  ⚙️︎  TrackingService.stopSelfResult(5): true
09-18 16:45:14.865 DEBUG [AbstractService onDestroy] 
  🔴  TrackingService stopped
09-18 16:45:14.868 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK

christocracy commented 1 year ago

reset: false,

Why are you using this? Do you know what it does?

neiljaywarner commented 1 year ago

i do notice JobScheduler triggerDelay: 3585339 Even if this is in milliseconds it seems a bit long. is this https://developer.android.com/reference/android/app/job/JobInfo.Builder#setTriggerContentUpdateDelay(long) Of course, i could be misunderstanding

neiljaywarner commented 1 year ago

reset: false,

Why are you using this? Do you know what it does? I would like to become more confident when to use it and when not to, however, I'm using this sample app advanced from home_view.dart to tie it to settings, since that a requirement for our app.

        reset: false, // <-- lets the Settings screen drive the config rather than re-applying each boot.
neiljaywarner commented 1 year ago

see https://github.com/neiljaywarner/flutter_background_geolocation/blob/inexact_alarms/example/lib/advanced/home_view.dart

christocracy commented 1 year ago

Config supplied to .ready(config) is consumed only at the first install and launch. Thereafter, the Settings screen drives the Config.

Config.reset was implemented purely for myself and my own testing with the demo app.

You cannot modify the Config to .ready and except it to be consumed.

neiljaywarner commented 1 year ago

I was pretty sure it was my mistake but it was at least the second time i did something wrong, please try to be patient while I'm sorting through it. Upon app install the schedule included 5:45 which is only in 15 minutes so i imagine i should hear it beeping soon and i will close the ticket; my apologies with scheduleUseAlarmManager: false how close would i expect it to be ? i guess within about 5 or 10 minutes or less depending on what else I have on my phone?

christocracy commented 1 year ago

Set reset: true. Then the Config will be consume at each launch.

neiljaywarner commented 1 year ago

I did not open the app but i heard a beep and the app info shows location accessed at 5:34pm despite the schedule being '1-7 17:45-18:45', is this expected because it's "close" to 17:45, or is this something else? I do notice no location reported at tracker.transistorsoft.com so maybe it's not a problem and I'll get clear info in a bit. thanks for the scoop so far, i think you are right and i just need to be more careful with steps to reproduce and clear storage+uninstall

christocracy commented 1 year ago

Schedules do not fire early.

neiljaywarner commented 1 year ago

cool, sounds good. I'm closing this then as my mistake. thanks again for a great plugin! (locations showed up without opening the app within about 1-2 minutes)