You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foregroundNotificationConfig: const ForegroundNotificationConfig(
notificationText:
"Example app will continue to receive your location even when you aren't using it",
notificationTitle: "Running in Background",
enableWakeLock: true,
));
print("before get current position");
Position? position;
try {
position =
await Geolocator.getCurrentPosition(locationSettings: locationSettings);
} catch (e) {
print("the error geooffline is $e");
}
return position;
}
Screenshots or video
Screenshots or video demonstration
[Upload media here]
Version
geolocator: ^13.0.1
Flutter Doctor output
lb@LBs-MacBook-Pro ~ % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0 24A335 darwin-x64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.94.1)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
lb@LBs-MacBook-Pro ~ %
The text was updated successfully, but these errors were encountered:
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
In Android 11 not able to fetch long in background
Expected results
to get lat long when app in background
Actual results
in background not response and no log producing
Code sample
@pragma('vm:entry-point')
Future<Position?> _determieOffline() async {
late LocationSettings locationSettings;
locationSettings = AndroidSettings(
accuracy: LocationAccuracy.high,
distanceFilter: 100,
forceLocationManager: true,
intervalDuration: const Duration(seconds: 10),
print("before get current position");
Position? position;
try {
position =
await Geolocator.getCurrentPosition(locationSettings: locationSettings);
} catch (e) {
print("the error geooffline is $e");
}
return position;
}
Screenshots or video
Screenshots or video demonstration
[Upload media here]
Version
geolocator: ^13.0.1
Flutter Doctor output
lb@LBs-MacBook-Pro ~ % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0 24A335 darwin-x64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.94.1)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
lb@LBs-MacBook-Pro ~ %
The text was updated successfully, but these errors were encountered: