transistorsoft / flutter_background_geolocation

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

does not detect the state change from Stationary to Moving #1311

Closed G3rson98 closed 3 months ago

G3rson98 commented 5 months ago

Your Environment

Expected Behavior

when motion change to Stationary then starting moving again , motion should change to moving state

Actual Behavior

when motion change to Stationary (after 10 min) then starting moving again , motion does not change

Steps to Reproduce

  1. start moving 2.stop moving and wait 10-15 min 3.start moving again

Context

just want that motion change

Debug logs

Logs ``` PASTE_YOUR_LOGS_HERE ``` I/TSLocationManager(25466): [c.t.l.l.TSLocationManager a] I/TSLocationManager(25466): ╔═════════════════════════════════════════════ I/TSLocationManager(25466): ║ getCurrentPosition LocationResult: 16 (640ms old) I/TSLocationManager(25466): ╠═════════════════════════════════════════════ I/TSLocationManager(25466): ╟─ 📍 Location[fused -17.810994,-63.208223 hAcc=5.0 et=+6h48m41s334ms alt=0.0 vAcc=0.5 vel=4.911761 sAcc=0.5 bear=222.88799 bAcc=30.0], time: 1718823485606 I/TSLocationManager(25466): [c.t.l.l.TSLocationManager onSingleLocationResult] I/TSLocationManager(25466): 🔵 Acquired current position D/TSLocationManager(25466): [c.t.l.l.TSLocationManager a] Median accuracy: 5.0 I/TSLocationManager(25466): [c.t.l.d.s.SQLiteLocationDAO persist] I/TSLocationManager(25466): ✅ INSERT: 75a07ba4-367d-4291-acf8-38a2dcbeaf21 [log] user: null -- [Location {odometer: 0.0, activity: {confidence: 100, type: still}, extras: {}, battery: {level: 1.0, is_charging: false}, uuid: 75a07ba4-367d-4291-acf8-38a2dcbeaf21, age: 658, coords: {altitude: 0.0, heading: 222.89, latitude: -17.8109936, accuracy: 5.0, heading_accuracy: 30.0, altitude_accuracy: 0.5, speed_accuracy: 0.5, speed: 4.91, age: 663, longitude: -63.2082231, ellipsoidal_altitude: 0.0}, is_moving: true, timestamp: 2024-06-19T18:58:05.606Z}] D/EGL_emulation(25466): app_time_stats: avg=40040.40ms min=40040.40ms max=40040.40ms count=1 D/EGL_emulation(25466): app_time_stats: avg=40032.63ms min=40032.63ms max=40032.63ms count=1 D/EGL_emulation(25466): app_time_stats: avg=40009.00ms min=40009.00ms max=40009.00ms count=1 I/TSLocationManager(25466): [c.t.l.scheduler.ScheduleEvent a] I/TSLocationManager(25466): ╔═════════════════════════════════════════════ I/TSLocationManager(25466): ║ ⏰ OneShot event fired: STOP_TIMEOUT I/TSLocationManager(25466): ╠═════════════════════════════════════════════ D/TSLocationManager(25466): [c.t.l.adapter.TSConfig e] ℹ️ Persist config, dirty: [isMoving] I/TSLocationManager(25466): [c.t.l.service.HeartbeatService stop] I/TSLocationManager(25466): 🔴 Stop heartbeat I/TSLocationManager(25466): [c.t.l.l.TSLocationManager d] I/TSLocationManager(25466): 🔴 Location-services: OFF I/TSLocationManager(25466): [c.t.l.service.TrackingService changePace] I/TSLocationManager(25466): 🔵 setPace: true → false I/TSLocationManager(25466): [c.t.l.l.TSLocationManager a] I/TSLocationManager(25466): ╔═════════════════════════════════════════════ I/TSLocationManager(25466): ║ motionchange LocationResult: 17 (863ms old) I/TSLocationManager(25466): ╠═════════════════════════════════════════════ I/TSLocationManager(25466): ╟─ 📍 Location[fused -17.810994,-63.208223 hAcc=5.0 et=+6h49m20s474ms alt=0.0 vAcc=0.5 vel=4.9118004 sAcc=0.5 bear=222.88805 bAcc=30.0], time: 1718823524745 I/TSLocationManager(25466): [c.t.l.l.TSLocationManager onSingleLocationResult] I/TSLocationManager(25466): 🔵 Acquired motionchange position, isMoving: false D/TSLocationManager(25466): [c.t.l.l.TSLocationManager a] Median accuracy: 5.0 D/TSLocationManager(25466): [c.t.l.g.TSGeofenceManager startMonitoringStationaryRegion] D/TSLocationManager(25466): 🎾 Start monitoring stationary region (radius: 150.0m -17.8109936,-63.2082231 hAcc=5.0) I/TSLocationManager(25466): [c.t.l.d.s.SQLiteLocationDAO persist] I/TSLocationManager(25466): ✅ INSERT: 562ec625-4c44-4e18-aed8-7d24a3be17ec D/TSLocationManager(25466): [c.t.l.service.AbstractService a] D/TSLocationManager(25466): 🎾 motionchange [TrackingService startId: 6, eventCount: 1] I/TSLocationManager(25466): [c.t.l.service.TrackingService k] I/TSLocationManager(25466): ╔═════════════════════════════════════════════ I/TSLocationManager(25466): ║ TrackingService motionchange: false I/TSLocationManager(25466): ╠═════════════════════════════════════════════ D/TSLocationManager(25466): [c.t.l.service.AbstractService a] D/TSLocationManager(25466): ⚙️︎ FINISH [TrackingService startId: 6, eventCount: 0, sticky: true] [log] user: null -- [Location {odometer: 0.0, activity: {confidence: 100, type: still}, extras: {}, event: motionchange, battery: {level: 1.0, is_charging: false}, uuid: 562ec625-4c44-4e18-aed8-7d24a3be17ec, age: 890, coords: {altitude: 0.0, heading: 222.89, latitude: -17.8109936, accuracy: 5.0, heading_accuracy: 30.0, altitude_accuracy: 0.5, speed_accuracy: 0.5, speed: 4.91, age: 899, longitude: -63.2082231, ellipsoidal_altitude: 0.0}, is_moving: false, timestamp: 2024-06-19T18:58:44.745Z}] [log] [motionchange] - isMoving: false, location: [Location {odometer: 0.0, activity: {confidence: 100, type: still}, extras: {}, event: motionchange, battery: {level: 1.0, is_charging: false}, uuid: 562ec625-4c44-4e18-aed8-7d24a3be17ec, age: 890, coords: {altitude: 0.0, heading: 222.89, latitude: -17.8109936, accuracy: 5.0, heading_accuracy: 30.0, altitude_accuracy: 0.5, speed_accuracy: 0.5, speed: 4.91, age: 899, longitude: -63.2082231, ellipsoidal_altitude: 0.0}, is_moving: false, timestamp: 2024-06-19T18:58:44.745Z}] D/EGL_emulation(25466): app_time_stats: avg=39425.36ms min=39425.36ms max=39425.36ms count=1 D/EGL_emulation(25466): app_time_stats: avg=39455.54ms min=39455.54ms max=39455.54ms count=1 D/EGL_emulation(25466): app_time_stats: avg=39496.74ms min=39496.74ms max=39496.74ms count=1 [log] timer location I/TSLocationManager(25466): [c.t.l.l.TSLocationManager a] I/TSLocationManager(25466): ╔═════════════════════════════════════════════ I/TSLocationManager(25466): ║ getCurrentPosition LocationResult: 18 (40062ms old) I/TSLocationManager(25466): ╠═════════════════════════════════════════════ I/TSLocationManager(25466): ╟─ 📍 Location[fused -17.810998,-63.208227 hAcc=5.223 et=+6h49m21s370ms alt=0.0 vAcc=0.5 vel=4.4718065 sAcc=0.5 bear=222.58945 bAcc=30.0], time: 1718823525642 I/TSLocationManager(25466): [c.t.l.l.TSLocationManager onSingleLocationResult] I/TSLocationManager(25466): 🔵 Acquired current position D/TSLocationManager(25466): [c.t.l.l.TSLocationManager a] Median accuracy: 5.0 I/TSLocationManager(25466): [c.t.l.d.s.SQLiteLocationDAO persist] I/TSLocationManager(25466): ✅ INSERT: 13648146-c4f9-487e-a188-cf42c8846742 [log] user: null -- [Location {odometer: 0.0, activity: {confidence: 100, type: still}, extras: {}, battery: {level: 1.0, is_charging: false}, uuid: 13648146-c4f9-487e-a188-cf42c8846742, age: 40072, coords: {altitude: 0.0, heading: 222.59, latitude: -17.8109979, accuracy: 5.22, heading_accuracy: 30.0, altitude_accuracy: 0.5, speed_accuracy: 0.5, speed: 4.47, age: 40076, longitude: -63.2082273, ellipsoidal_altitude: 0.0}, is_moving: false, timestamp: 2024-06-19T18:58:45.642Z}] D/EGL_emulation(25466): app_time_stats: avg=40018.70ms min=40018.70ms max=40018.70ms count=1 D/EGL_emulation(25466): app_time_stats: avg=39987.64ms min=39987.64ms max=39987.64ms count=1 D/EGL_emulation(25466): app_time_stats: avg=39956.32ms min=39956.32ms max=39956.32ms count=1 [log] timer location I/TSLocationManager(25466): [c.t.l.l.TSLocationManager a] I/TSLocationManager(25466): ╔═════════════════════════════════════════════ I/TSLocationManager(25466): ║ getCurrentPosition LocationResult: 19 (80117ms old) I/TSLocationManager(25466): ╠═════════════════════════════════════════════ I/TSLocationManager(25466): ╟─ 📍 Location[fused -17.810998,-63.208227 hAcc=5.223 et=+6h49m21s370ms alt=0.0 vAcc=0.5 vel=4.4718065 sAcc=0.5 bear=222.58945 bAcc=30.0], time: 1718823525642 I/TSLocationManager(25466): [c.t.l.l.TSLocationManager onSingleLocationResult] I/TSLocationManager(25466): 🔵 Acquired current position D/TSLocationManager(25466): [c.t.l.l.TSLocationManager a] Median accuracy: 5.0 I/TSLocationManager(25466): [c.t.l.d.s.SQLiteLocationDAO persist] I/TSLocationManager(25466): ✅ INSERT: e0560435-342c-4cef-b9d5-211a9b0825f7 [log] user: null -- [Location {odometer: 0.0, activity: {confidence: 100, type: still}, extras: {}, battery: {level: 1.0, is_charging: false}, uuid: e0560435-342c-4cef-b9d5-211a9b0825f7, age: 80125, coords: {altitude: 0.0, heading: 222.59, latitude: -17.8109979, accuracy: 5.22, heading_accuracy: 30.0, altitude_accuracy: 0.5, speed_accuracy: 0.5, speed: 4.47, age: 80129, longitude: -63.2082273, ellipsoidal_altitude: 0.0}, is_moving: false, timestamp: 2024-06-19T18:58:45.642Z}] D/EGL_emulation(25466): app_time_stats: avg=40050.07ms min=40050.07ms max=40050.07ms count=1 D/EGL_emulation(25466): app_time_stats: avg=40059.05ms min=40059.05ms max=40059.05ms count=1 D/EGL_emulation(25466): app_time_stats: avg=40054.11ms min=40054.11ms max=40054.11ms count=1
christocracy commented 5 months ago

I/TSLocationManager(25466): ║ ⏰ OneShot event fired: STOP_TIMEOUT

G3rson98 commented 5 months ago

is that behavior expected? moving state is not fired automatically when moving, after this.

christocracy commented 5 months ago

A device typically needs to move at least 200 meters before motion is detected.

also see https://dontkillmyapp.com

github-actions[bot] commented 4 months ago

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

github-actions[bot] commented 3 months ago

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