flutter_background_geolocation
flutter_background_geolocation copied to clipboard
[Help Wanted]: After finishing a trip and standing still, I received many locations with jump speed and their activity is in_vehicle.
Required Reading
- [x] Confirmed
Plugin Version
4.16.9
Mobile operating-system(s)
- [ ] iOS
- [x] Android
Device Manufacturer(s) and Model(s)
Samsung A53
Device operating-systems(s)
android 14
What do you require assistance about?
After completing an in_vehicle movement, instead of switching to still when standing still, the library returns to me an activity that is in_vehicle with locations jumping randomly around the position where I'm standing still. I think it might be due to multiple GPS issues, but I've encountered this frequently in recent trips. Please help me solve this problem.
[Optional] Plugin Code and/or Config
bg.BackgroundGeolocation.ready(bg.Config(
schedule: ['1-7 08:00-18:00'],
reset: false,
debug: false,
logLevel: bg.Config.LOG_LEVEL_VERBOSE,
desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
stopTimeout: 2,
distanceFilter: 5,
disableElasticity: false,
locationUpdateInterval: 4000,
fastestLocationUpdateInterval: 3000,
autoSync: true,
activityType: bg.Config.ACTIVITY_TYPE_OTHER_NAVIGATION,
activityRecognitionInterval: 1000,
stopOnTerminate: false,
notification: bg.Notification(
title: "Suivi de localisation",
text: "Détection d'activité en cours...",
channelName: "Détection d'Activité",
),
startOnBoot: true,
enableHeadless: true,
persistMode: bg.Config.PERSIST_MODE_NONE,
heartbeatInterval: 60,
pausesLocationUpdatesAutomatically: false,
backgroundPermissionRationale: bg.PermissionRationale(
title:
"Autoriser {applicationName} à accéder à la localisation de cet appareil.",
message:
"L'application vous aide à gérer et à enregistrer vos trajets de manière pratique.",
positiveAction: 'Toujours autoriser',
negativeAction: 'Annuler')))
.then((bg.State state) async {
if (user.mode == 'normal') {
await updateSchedule(['1-7 00:00-23:59'], user.status ?? true);
} else {
final listSchedule =
await convertWorkingHoursToSchedule(user.workingHours ?? []);
await updateSchedule(listSchedule, user.status ?? true);
}
}).catchError((error) {
print('=========error===========$error');
});
_isInitialized = true;
} catch (e) {
print('====================$e');
rethrow;
}
}
[Optional] Relevant log output
@christocracy
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.