Flutter info (flutter doctor):
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.1, on macOS 14.1.1 23B81 darwin-arm64, locale pl-PL)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.90.0)
[✓] Connected device (6 available)
[✓] Network resources
I can read current user location when app is in foreground without 'Background location is not enabled' modal/popup
Actual Behavior
When I try to read a single user's current location while the app is in foreground , the app displays the modal/popup “Background location is not enabled”.
Steps to Reproduce
call await bg.BackgroundGeolocation.ready with provided above config
call await bg.BackgroundGeolocation.getCurrentPosition() with provided above config
only on iOS you can see modal
Context
image 1:
image 2:
In my app I have a function where I track the user in the background and it works fine. But now in another scenario I need to read only the current position of the user and when I call bg.BackgroundGeolocation.getCurrentPosition() on iOS the modal “image 2” appears. The modal only appears on iOS. I think this is incorrect behavior, because when we call getCurrentPosition, we do not need background tracking permissions. I think it should be required only when we call bg.BackgroundGeolocation.start (). Is there any way to disable this modal when we call getCurrentPosition and show only for bg.BackgroundGeolocation.start (). Of course, the modal asking for permission (image 1) should be visible in both cases.
Your Environment
Flutter info (
flutter doctor
): Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.24.1, on macOS 14.1.1 23B81 darwin-arm64, locale pl-PL) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.90.0) [✓] Connected device (6 available) [✓] Network resources• No issues found!
Expected Behavior
I can read current user location when app is in foreground without 'Background location is not enabled' modal/popup
Actual Behavior
When I try to read a single user's current location while the app is in foreground , the app displays the modal/popup “Background location is not enabled”.
Steps to Reproduce
Context
image 1:
image 2:
In my app I have a function where I track the user in the background and it works fine. But now in another scenario I need to read only the current position of the user and when I call bg.BackgroundGeolocation.getCurrentPosition() on iOS the modal “image 2” appears. The modal only appears on iOS. I think this is incorrect behavior, because when we call getCurrentPosition, we do not need background tracking permissions. I think it should be required only when we call bg.BackgroundGeolocation.start (). Is there any way to disable this modal when we call getCurrentPosition and show only for bg.BackgroundGeolocation.start (). Of course, the modal asking for permission (image 1) should be visible in both cases.
Debug logs
Logs
``` PASTE_YOUR_LOGS_HERE ```