Skip to content

[Help Wanted]: After finishing a trip and standing still, I received many locations with jump speed and their activity is in_vehicle. #1482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 3 tasks
Phan-AnhDuc opened this issue May 12, 2025 · 1 comment

Comments

@Phan-AnhDuc
Copy link

Required Reading

  • Confirmed

Plugin Version

4.16.9

Mobile operating-system(s)

  • iOS
  • 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.

Image

[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

@Phan-AnhDuc
Copy link
Author

@christocracy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant