Skip to content

Fix - Background Location Permissions on Android 11#188

Open
hrodrick wants to merge 5 commits intoicerockdev:developfrom
hrodrick:fix/background-location-android-11
Open

Fix - Background Location Permissions on Android 11#188
hrodrick wants to merge 5 commits intoicerockdev:developfrom
hrodrick:fix/background-location-android-11

Conversation

@hrodrick
Copy link
Copy Markdown

@hrodrick hrodrick commented Dec 11, 2025

Starting on Android 11, background location permission must be requested separately from the foreground location permissions (coarse & fine). Requesting them together causes the operative system to ignore the whole request.

This PR addresses and fixes the issue.
This PR addresses #139

Note: The fix was tested on the compose sample module (testing-only changes were not included on this PR)

Docs Link: https://developer.android.com/develop/sensors-and-location/location/permissions/runtime#request-only-foreground

Caution: If your app targets Android 11 (API level 30) or higher, the system enforces this best practice. If you request a foreground location permission and the background location permission at the same time, the system ignores the request and doesn't grant your app either permission.

It is responsibility of the developers to request the permissions in the correct order.

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

Successfully merging this pull request may close these issues.

3 participants