Required Reading
Plugin Version
5.1.2
Flutter Doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.35.2, on macOS 15.6 24G84 darwin-arm64, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.1.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1)
[✓] Connected device (3 available)
[✓] Network resources
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
Galaxy S20, iPhone 12
Device operating-systems(s)
iOS 26.1, Anroid 13
What happened?
When the user is moving, location updates are successfully posted to the server. However, after some time, when a new location should be sent, the plugin repeatedly posts an old coordinate from a previously visited location instead of the user's current position.
For example:
The user moves from Point A to Point B to Point C.
Initially, the server receives the correct coordinates.
Later, instead of sending the current location, it continuously sends the coordinates of a past location (such as Point B), even though the user has already moved elsewhere.
Plugin Code and/or Config
bg.BackgroundGeolocation.ready(bg.Config(
geolocation: bg.GeoConfig(
desiredAccuracy: bg.DesiredAccuracy.high,
distanceFilter: 30,
deferTime: 3000,
pausesLocationUpdatesAutomatically: false,
geofenceModeHighAccuracy: true,
useSignificantChangesOnly: Platform.isIOS,
fastestLocationUpdateInterval: 60000,
locationUpdateInterval: 300000,
locationAuthorizationRequest: 'Always',
locationAuthorizationAlert: {},
),
app: bg.AppConfig(
preventSuspend: true,
heartbeatInterval: 600,
stopOnTerminate: false,
startOnBoot: true,
enableHeadless: true,
notification: bg.Notification(),
backgroundPermissionRationale: bg.PermissionRationale(),
),
http: bg.HttpConfig(
url: "${Constants.url}/api/user_position",
params: {"uid": _auth.currentUser!.uid},
headers: {"Content-Type": "application/json"},
rootProperty: 'data',
),
activity: bg.ActivityConfig(),
)).then((bg.State state) {
if (!state.enabled) {
bg.BackgroundGeolocation.start();
}
});
Relevant log output
Required Reading
Plugin Version
5.1.2
Flutter Doctor
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
Galaxy S20, iPhone 12
Device operating-systems(s)
iOS 26.1, Anroid 13
What happened?
When the user is moving, location updates are successfully posted to the server. However, after some time, when a new location should be sent, the plugin repeatedly posts an old coordinate from a previously visited location instead of the user's current position.
For example:
The user moves from Point A to Point B to Point C.
Initially, the server receives the correct coordinates.
Later, instead of sending the current location, it continuously sends the coordinates of a past location (such as Point B), even though the user has already moved elsewhere.
Plugin Code and/or Config
Relevant log output