Closed G3rson98 closed 3 months ago
I/TSLocationManager(25466): ║ ⏰ OneShot event fired: STOP_TIMEOUT
is that behavior expected? moving state is not fired automatically when moving, after this.
A device typically needs to move at least 200 meters before motion is detected.
also see https://dontkillmyapp.com
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Your Environment
flutter doctor
): [✓] Flutter (Channel stable, 3.19.3, on macOS 14.4 23E214 darwin-arm64, locale es-419) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) [✓] Android Studio (version 2023.2) [✓] VS Code (version 1.90.1) [✓] Connected device (2 available) [✓] Network resourcesPlugin config:
class BGConfig { static final BGConfig _singleton = BGConfig._internal();
factory BGConfig() { return _singleton; }
BGConfig._internal();
final _config = bg.Config( desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH, persistMode: bg.Config.PERSIST_MODE_LOCATION, logLevel: bg.Config.LOG_LEVEL_VERBOSE, enableHeadless: true, stopOnTerminate: false, startOnBoot: true, debug: false, isMoving: true, distanceFilter: 10, locationUpdateInterval: 10000, deferTime: 10000, stopOnStationary: false, disableMotionActivityUpdates: false, useSignificantChangesOnly: false, stopTimeout: 10, activityRecognitionInterval: 10000, minimumActivityRecognitionConfidence: 70, allowIdenticalLocations: true, backgroundPermissionRationale: bg.PermissionRationale( title: 'Permitir que XYZ acceda a la ubicación de este dispositivo incluso cuando esté cerca o no esté en uso?', message: 'XYZ recopila datos de tu ubicación, para realizar seguimiento', positiveAction: "Cambiar a 'Permitir todo el tiempo'", negativeAction: 'Cancelar', ), locationAuthorizationRequest: 'Always', notification: bg.Notification( priority: bg.Config.NOTIFICATION_PRIORITY_MAX, strings: {}, layout: "", actions: [], title: 'XYZ', text: 'XYZ está utilizando tu ubicación', sticky: true, ), );
config() { bg.BackgroundGeolocation.onLocation((bg.Location location) { Modular.get().onLocation(location);
});
bg.BackgroundGeolocation.onActivityChange((bg.ActivityChangeEvent event) {
log(
'[activitychange] - Activity: ${event.activity}, Confidence: ${event.confidence}',
);
});
bg.BackgroundGeolocation.onMotionChange((bg.Location value) {
log('[motionchange] - isMoving: ${value.isMoving}, location: $value');
if (value.isMoving) {
bg.BackgroundGeolocation.changePace(true);
}
});
bg.BackgroundGeolocation.ready(_config);
}
reConfigAndStart() { bg.BackgroundGeolocation.setConfig(_config).then((state) { log('[setConfig] success: ${state.enabled}'); bg.BackgroundGeolocation.start(); }); } }
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
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