Credits for the answer to @Stephen Ruda

I have run into the exact same problem. I agree that this is an issue for any developer who needs background location permission. I would like to add additional notes for other readers:

(1) On API 30+ you will first need basic location permissions before asking for background location permission - otherwise, it won't go to the permission screen at all.

(2) When you ask for background location permission and it sends them to the permission request screen, it will only 'lock' the user out if they ONLY hit the back button. If they tap any of the options and then back the request will work again.

Answer from Victor Laerte on Stack Overflow
🌐
Google Support
support.google.com › googleplay › android-developer › answer › 9799150
Understanding location in the background permissions - Play Console Help
Minimum scope: Apps should request the minimum scope necessary (for example, using foreground instead of background device location permissions, using the location button for one-time or transactional location requests) to provide the feature or service that requires location. And users should reasonably expect that an app’s feature or service needs the level of location requested. For details and guidance on accessing foreground device location - including requirements for implementing the location button (apps targeting Android 17 or higher), please refer to the Minimum Scope: Foreground Location Access and the Location Button article.
🌐
Android Developers
developer.android.com › core areas › sensors and location › request location permissions
Request location permissions | Sensors and location | Android Developers
If a feature in your app absolutely requires access to precise location using the ACCESS_FINE_LOCATION permission, you can ask the user to allow your app to access precise location.
Discussions

Android 11 users can’t grant background location permission? - Stack Overflow
In order to enable background location ... location permission on a settings page, as described in the guide on how to Request background location. https://developer.android.com/about/versions/11/privacy/location#change-details · The user-visible label of the settings option that grants background location (for example, Allow all ... More on stackoverflow.com
🌐 stackoverflow.com
Background Location, and Permissions - seeking urgent help
Clearly, when the app is backgrounded by tapping on the device home button, the foreground service is no longer active, neither the Location API is performing any callback invocations. Have you investigated why this happens? maybe it's not a location permission thing. Are you stopping the service somewhere in your code? Do they see the foreground service notification in the status bar? Foreground services don't just stop by themselves, either you stop it programmatically, the user stops it with some stop button you have, the user force stops the app, an app killer / battery saver kills it or you turn off the phone. More on reddit.com
🌐 r/androiddev
19
3
April 17, 2023
Background Location Limits
If I recall correctly you have two options: A foreground service that you'll have to specify in the manifest is used for location services specifically (can't remember from which Android version that requirement was introduced). Request background location permission, this gives you the same ability as a foreground service but Google is extremely restrictive granting this permission. I'd opt for option 1. To note is that if you use FusedLocationProvider and even if you call getCurrentLocation the system will sometimes provide you with a cached location if the system deems it recent enough. More on reddit.com
🌐 r/androiddev
14
7
December 29, 2023
How to fix "Location permissions needed" on weather widget?
I have a fix! video Turns out this isn't the same as giving google permission to use location in your settings for some unknown reason. Also you can get to the same place as I did in the video as just going to: settings → apps → google → notifications → additional settings in the app → search for location with the search button → always allow → click on weather widget once and then go back to the home screen More on reddit.com
🌐 r/android_beta
105
58
October 21, 2021
🌐
Android Developers
developer.android.com › core areas › sensors and location › request background location
Request background location | Sensors and location | Android Developers
If your app hasn't been granted ... user-visible label of the settings option that grants background location (for example, Allow all the time in figure 7)....
🌐
Android Developers
developer.android.com › core areas › sensors and location › access location in the background
Access location in the background | Sensors and location | Android Developers
February 26, 2026 - Use the following checklist to identify potential location access logic in the background: In your app's manifest, check for the ACCESS_COARSE_LOCATION permission and the ACCESS_FINE_LOCATION permission.
Top answer
1 of 3
22

Credits for the answer to @Stephen Ruda

I have run into the exact same problem. I agree that this is an issue for any developer who needs background location permission. I would like to add additional notes for other readers:

(1) On API 30+ you will first need basic location permissions before asking for background location permission - otherwise, it won't go to the permission screen at all.

(2) When you ask for background location permission and it sends them to the permission request screen, it will only 'lock' the user out if they ONLY hit the back button. If they tap any of the options and then back the request will work again.

2 of 3
0

you cannot request foreground and background permission same time and cannot request background location permission without foreground permission granted. Therefore first you have to request foreground permission and then 'onRequestPermissionsResult' you can request background permission

First in onCreate

 if (ActivityCompat.checkSelfPermission(
            this,
            Manifest.permission.ACCESS_COARSE_LOCATION
    ) != PackageManager.PERMISSION_GRANTED || ActivityCompat.checkSelfPermission(
            this,
            Manifest.permission.ACCESS_FINE_LOCATION
    ) != PackageManager.PERMISSION_GRANTED
    ) {

        ActivityCompat.requestPermissions(
                this,
                new String[]{
                        Manifest.permission.ACCESS_COARSE_LOCATION,
                        Manifest.permission.ACCESS_FINE_LOCATION
                },
                1
        );


   @Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
        ) {
            if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_BACKGROUND_LOCATION) != PackageManager.PERMISSION_GRANTED
            ) {
                ActivityCompat.requestPermissions(
                        this,
                        new String[]{Manifest.permission.ACCESS_BACKGROUND_LOCATION},
                        1
                );
            }
        }
    }
}
🌐
Google
developers.google.com › google maps platform › android › navigation sdk for android › background location usage best practices
Background location usage best practices | Navigation SDK for Android | Google for Developers
April 13, 2026 - This page explains best practices for requesting and managing background location usage permissions. Starting with Android 14, apps must have the ACCESS_BACKGROUND_LOCATION permission in order to access the user's location.
🌐
Medium
medium.com › @ty2 › understanding-permissions-for-background-location-on-android-11-and-below-bc3ad9be320a
Understanding permissions for background location on Android 11 and below | by Abhi | Medium
August 27, 2024 - When requesting location permission on Android 11, it will show 3 options with an additional message. The message tells the user that if she wishes to allow the app access to location all the time, then enable it in settings. So the “allow all the time” option isn’t shown via pop-up dialog anymore but accessible only in the app’s location permissions settings. ... To be able to access background location if your app targets API 29 and above, you need to add this permission to the manifest
Find elsewhere
🌐
Android Developers
developer.android.com › about › versions › 11 › privacy › location
Location updates in Android 11 | Android Developers
When a feature in your app requests background location on a device that runs Android 11 or higher, the system dialog doesn't include a button to enable background location access. In order to enable background location access, users must set the Allow all the time option for your app's location permission on a settings page, as described in the guide on how to Request background location.
🌐
Thestreamliners
thestreamliners.in › blog › background-location-permission-in-android-11-and-above
Background Location Permission in Android 11 and above
If you ask for ACCESS_FINE_LOCATION and ACCESS_BACKGROUND_LOCATION at once then permission dialog will not shown. First ask for fine location and if user accepts then ask for background location. In Android Version lower than 11, ACCESS_BACKGROUND_LOCATION shows a dialog like this:
🌐
Yudiz Solutions Ltd.
blog.yudiz.com › background-location-usage-in-android-11
How To Use Background Location in Android Version 11
December 6, 2024 - Android 10 (Q): New ACCESS_BACKGROUND_LOCATION permission for the apps using location in background, prior to this version there was a single permission for background and foreground state of application. Android 11 (R): ACCESS_BACKGROUND_LOCATION is separated from other location permissions, the user has to grant background permission explicitly from the application’s setting page.
🌐
Medium
mohitsingh2002.medium.com › background-location-permission-in-android-11-and-above-1ab7399ec861
Background Location Permission in Android 11 and above | by Mohit Singh | Medium
June 23, 2021 - If you ask for ACCESS_FINE_LOCATION and ACCESS_BACKGROUND_LOCATION at once then permission dialog will not shown. First ask for fine location and if user accepts then ask for background location. In Android Version lower than 11, ACCESS_BACKGROUND_LOCATION shows a dialog like this:
🌐
Medium
medium.com › swlh › request-location-permission-correctly-in-android-11-61afe95a11ad
Request Location Permission Correctly in Android 11. | by Lam Pham | The Startup | Medium
April 26, 2025 - From Android 10(≥10), background location came as an independent resource. Apps have to request explicitly this permission besides the foreground one.
🌐
Android Open Source Project
source.android.com › docs › core › permissions › background-location-access
Background location access reminder | Android Open Source Project
April 10, 2026 - In Android 9 and lower, an app can track a device's location while running in the background without the user's knowledge. Users can suppress this behavior in Android 10 by selecting either the Allow only while using the App or Deny location access permission.
🌐
Ackee
ackee.agency › blog › how-to-fetch-location-in-background-on-android
How to Reliably Fetch Location in Background on Newest Andro
February 14, 2023 - ACCESS_BACKGROUND_LOCATION permission is now required when accessing location while the app is in the background. Users can now decide if they allow the app access only when it is in the foreground or at any time.
🌐
Medium
medium.com › @mahbooberezaee68 › background-location-limits-over-different-android-versions-df67202250fd
Background Location Limits Over Different Android Versions | by Bahar | Medium
January 9, 2025 - In this example, MyLocationService is declared as a foreground service with the location type, and the app would require both android.permission.FOREGROUND_SERVICE and android.permission.FOREGROUND_SERVICE_LOCATION permissions. android:stopWithTask=”false” attribute determines whether the service is stopped when the associated task is finished. false means the service will continue running even if the activity or other components of the task are destroyed. ... This article has explored Background Location Limits Over Different Android Versions.
🌐
Google
android-developers.googleblog.com › 2020 › 11 › tips-for-getting-your-app-approved-for-background-location-access.html
Android Developers Blog: Tips for getting your app approved for background location access
Users consistently tell us that ... to Google Play’s Location Permissions policy and enhancements to location permission controls in Android 11. To help prevent unnecessary access to background location, the updated policy allows access only if it’s critical to the ...
🌐
Notificare
notificare.com › blog › 2024 › 01 › 26 › android-location-permission-guide
Android Location Permission Guide | Notificare
January 26, 2024 - Whether precise or approximate foreground location was granted earlier, background location updates will align accordingly, maintaining either precision level. To request background permission, we first declare our launcher:
🌐
Timeero
help.timeero.com › android-how-to
Android: How to enable Background Location Permissions
Select Allow all the time to give the app permission to access your location in the background. Yes, without this permission, the app can only track while the app is open on your phone. Setting it to allow always will allow it to run in the background for accurate tracking.
🌐
Berkeleycollege
engage.berkeleycollege.edu › default › android_background_location › index
Android Background Location
Depending on the Android version, you may see different options. If given the option, the "Always" selection enables location services to be used while the app is closed or not in use; "Allow only while using the app" will restrict these permissions to only allow location information to be accessed while the app is open and being used. You can see an example of these permissions on Android 11 in the screenshot below.
🌐
GitHub
github.com › Woosmap › geofencing-android-sdk › blob › master › doc › EnablingLocation.md
geofencing-android-sdk/doc/EnablingLocation.md at master · Woosmap/geofencing-android-sdk
When the user next opens your app and a feature in your app requests access to location, the user is prompted for the permission again. When a feature in your app requests background location on a device that runs Android 10 (API level 29), the system permissions dialog includes an option named Allow all the time.
Author   Woosmap