Flutter info (flutter doctor):
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4249], locale nl-NL)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[!] Android Studio (version 2023.3)
X Unable to determine bundled Java version.
[√] Android Studio (version 2024.1)
[√] VS Code (version 1.93.1)
[√] Connected device (2 available)
[√] Network resources
! Doctor found issues in 1 category.
Plugin config:
bg.BackgroundGeolocation.ready(
bg.Config(
desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
stopOnTerminate: false,
stopTimeout: 1,
distanceFilter: 1,
disableElasticity: true,
isMoving: true,
enableHeadless: true,
url: null,
persistMode: bg.Config.PERSIST_MODE_NONE,
startOnBoot: true,
debug: false,
heartbeatInterval: 60,
logLevel: bg.Config.LOG_LEVEL_VERBOSE,
foregroundService: true,
notification: bg.Notification(
title: "Tracker app",
text: "Started location & ble scanning",
priority: bg.Config.NOTIFICATION_PRIORITY_LOW),
locationAuthorizationRequest: 'Always',
backgroundPermissionRationale: bg.PermissionRationale(
title:
"Allow {applicationName} to access to this device's location in the background?",
message:
"In order to track your activity in the background, please enable {backgroundPermissionOptionLabel} location permission",
positiveAction: "Change to {backgroundPermissionOptionLabel}",
negativeAction: "Cancel")),
).then((bg.State state) {
if (!state.enabled) {
////
// 3. Start the plugin.
//
bg.BackgroundGeolocation.start();
}
});
Expected Behavior
For the application we are building we are mainly interested in the stop locations (and we want to know the device is actually stopped). We don't care too much about points recorded while the phone is moving. Ideally a stop is defined as having no motion (accelerometer driven) for a configurable seconds.
Actual Behavior
With the configuration above we do get all 'relevant' location points. When driving we do get correctly the last location point of the trip, however when cannot always reliably figure out that this is a stop. Our current logic is to look at a location of speed/activity/moving flag. However on this last location point:
speed is not always close to zero
activity.type is not always still
the moving flag is not always false
At this point my main question is what is the correct expectation here? Can we expect to always get a transition to moving -> false? Or can we always expect the activity to go to still. And if so what is the expected timeout to get that transition? Is it controllable in any way?
Your Environment
flutter doctor
): Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4249], locale nl-NL) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [√] Chrome - develop for the web [!] Android Studio (version 2023.3) X Unable to determine bundled Java version. [√] Android Studio (version 2024.1) [√] VS Code (version 1.93.1) [√] Connected device (2 available) [√] Network resources! Doctor found issues in 1 category.
Expected Behavior
For the application we are building we are mainly interested in the stop locations (and we want to know the device is actually stopped). We don't care too much about points recorded while the phone is moving. Ideally a stop is defined as having no motion (accelerometer driven) for a configurable seconds.
Actual Behavior
With the configuration above we do get all 'relevant' location points. When driving we do get correctly the last location point of the trip, however when cannot always reliably figure out that this is a stop. Our current logic is to look at a location of speed/activity/moving flag. However on this last location point:
Steps to Reproduce
At this moment just a behavioral question
Context
Debug logs
Logs
``` PASTE_YOUR_LOGS_HERE ```