-
Notifications
You must be signed in to change notification settings - Fork 249
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
Location Tracking Issue in Foreground Mode with flutter_background_geolocation #1407
Comments
The plug-in operates no differently in background vs foreground. have you read the wiki “Philosophy of Operation”?
This is rather high. You should be testing outside with real movement. |
If you’re not using geofences (and monitoring < 100 geofences), this option is not used. |
Is it possible for the tracking process to stop or terminate if the app is in use in the foreground and performing other operations? The tracking works fine when the app is in the background or terminated state, but not when it is active in the foreground. ?? |
Not automatically, no. The plugin doesn't care if your app is in the foreground or background. It does not change its behaviour on app state. It only cares if the device moving or stationary. |
Detected invalid location (teleport) with apparent speed of 3313.2917 meters/s (distance from last location: 7749.7896 meters, dt: 2339.0) D/TSLocationManager(19909): ╟─ Age: 135ms, time: 1737273483542 its getting logs |
Are you testing with a mock location app? You cannot fully test this plug-ins natural behaviour with mocked location. You need to go outside and test with real movement. |
Your Environment
flutter doctor
):flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.27.1, on Microsoft Windows [Version 10.0.22631.4602], locale en-IN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Enterprise 2019 16.11.20)
[√] Android Studio (version 2021.3)
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.96.2)
[√] Connected device (4 available)
[√] Network resources
Expected Behavior
Location tracking should work consistently, regardless of whether the app is in the foreground or background.
Actual Behavior
Location tracking stops when the app is in the foreground and actively in use. No logs or location data are generated during this time.
Steps to Reproduce
Context
Trying to track real-time locations reliably for an active user.
Debug logs
Logs
The text was updated successfully, but these errors were encountered: