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
Device location is personal, and sensitive user data may never be sold nor shared for a purpose facilitating sale (for example, for noncompliant SDK use). That’s why apps that access location in the background must be approved via the permission declaration process in the developer console.
🌐
Android Developers
developer.android.com › core areas › sensors and location › request location permissions
Request location permissions | Sensors and location | Android Developers
On Android 10 (API level 29) and higher, you must declare the ACCESS_BACKGROUND_LOCATION permission in your app's manifest in order to request background location access at runtime.
Discussions

Android 11 users can’t grant background location permission? - Stack Overflow
As of Android 11, apps targeting ... location permission to an app more than once. If not initially granted, it requires users to go to a settings page. How do we bring a user to the proper settings page? 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... More on stackoverflow.com
🌐 stackoverflow.com
kotlin - How to access background location permission on runtime in android 13? - Stack Overflow
How to access background location permission on runtime in android 13? Here is my code. Its not showing any popup for access permission from users. Im new to android. fun askForLocationPermission( More on stackoverflow.com
🌐 stackoverflow.com
When to use access background location permission? Android Java - Stack Overflow
I am developing a transit wand application that captures bus routes and passenger stops and then records them. Do I need to use background location permission? I am requesting location updates in a More on stackoverflow.com
🌐 stackoverflow.com
ACCESS_BACKGROUND_LOCATION permission (declaration form) confusion

I've looked into this recently, and what I noted down is

  • it's an install-time permission; you do not request it at runtime with requestPermissions

  • "On Android 11 (API level 30) and higher, if your app starts a foreground service while running in the background," the service cannot access location, unless the user has granted the ACCESS_BACKGROUND_LOCATION permission to your app.

  • So, let's say a user of your app presses a button, and it starts a foreground service that requires location access. For that, you wouldn't need this permission, because you start the service while the app is not in the background.

  • An app is considered to be running in the background as long as each of the following conditions are satisfied:

    • None of the app's activities are currently visible to the user.

    • The app isn't running any foreground services that started while an activity from the app was visible to the user.

  • As I understand it, as long as you start a foreground service while the app is in the foreground, you don't need this permission, because the user will already have permitted foreground access to their location, f.e. with ACCESS_FINE_LOCATION

This is my take on it, but I might be wrong.

Oh and if you end up needing this permission after all, you also have to add android:foregroundServiceType="location" to your service in the manifest.

More on reddit.com
🌐 r/androiddev
13
10
December 21, 2020
🌐
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.
🌐
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 - 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
🌐
Android Developers
developer.android.com › core areas › sensors and location › request background location
Request background location | Sensors and location | Android Developers
The user-visible label of the settings option that grants background location (for example, Allow all the time in figure 7). You can call getBackgroundPermissionOptionLabel() to get this label.
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
                );
            }
        }
    }
}
Find elsewhere
🌐
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 - This is a normal permission, so ... apps targeting API level 28+ ... ACCESS_BACKGROUND_LOCATION permission is now required when accessing location while the app is in the background....
🌐
Android Developers
developer.android.com › about › versions › 11 › privacy › location
Location updates in Android 11 | Android Developers
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.
🌐
Radar
radar.com › blog › guide-to-play-store-background-location-approval
The guide to Play Store background location approval - Radar
September 5, 2025 - Clearly explain location data usage in your privacy policy, and make your privacy policy accessible in your app and in your Play Store listing · In your "prominent disclosure" shown to users before the runtime OS background permissions prompt, explicitly include all of the following: (1) the phrase "location," (2) the phrase "background", "when the app is closed," "always in use", or "when the app is not in use," (3) all of the features that use location in the background, (4) if used to support ads, the phrase "used to support ads"
🌐
Stack Overflow
stackoverflow.com › questions › 77299714 › how-to-access-background-location-permission-on-runtime-in-android-13
kotlin - How to access background location permission on runtime in android 13? - Stack Overflow
= null ) { val permissions = arrayOf( Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_BACKGROUND_LOCATION ) val requestPermissionLauncher = activity.registerForActivityResult(ActivityResultContracts.RequestPermission()) { isGranted -> if (isGranted) { permissionGranted() } else { permissionDenied?.invoke() } } if (arePermissionsGranted(activity, permissions)) { // Permissions are already granted permissionGranted() } else { // Request permissions requestPermissionLauncher.launch(permissions) } } private fun arePermissionsGranted(activity: Activity, permissions: Array<String>): Boolean { return permissions.all { ContextCompat.checkSelfPermission(activity, it) == PackageManager.PERMISSION_GRANTED } }
🌐
Stack Overflow
stackoverflow.com › questions › 79308204 › when-to-use-access-background-location-permission-android-java
When to use access background location permission? Android Java - Stack Overflow
I am requesting location updates in a Service and using the Fused Location Provider for this purpose. In MainActivity (request-permission) private void askForForegroundLocationPermission(Runnable backgroundPermission) { if (ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this, Manifest.permission.ACCESS_FI
🌐
Reddit
reddit.com › r/androiddev › access_background_location permission (declaration form) confusion
r/androiddev on Reddit: ACCESS_BACKGROUND_LOCATION permission (declaration form) confusion
December 21, 2020 -

With the upcoming Location permission declaration policy requirement, can someone please explain how android.permission.ACCESS_BACKGROUND_LOCATION supposed to work, when it's required, especially for foreground services, how to request it, when it's granted, and when a policy declaration form submission is needed?

The official documentation is vague and contradicting...

  • Supposedly a "foreground service" (app) shouldn't use the permission at all, but the GMS Geofencing API seem to require it!?

  • Getting location updates doesn't require the permission?

  • Is the permission required for every other feature needing ACCESS_COURSE_LOCATION or ACCESS_FINE_LOCATION, e.g. Bluetooth, Wi-Fi, CellInfo?

  • It's said we should perform incremental location permission requests , but it seems the permission can't be requestPermissions requested by itself, resulting in PERMISSION_DENIED. On Android 10 it has to be done in combination with either ACCESS_COURSE_LOCATION or ACCESS_FINE_LOCATION, otherwise the "Allow all the time" option won't be presented, yet those permissions are confusingly labeled "access approximate/precise location only in the foreground". On Android 11 it seems one of those "foreground" has to be granted in a separate requestPermissions prior, even if only "background" is actually used.

  • The requesting location permissions documentation say that a foreground service will retain access when placed in the background, e.g. by a Home button tap, but the declaration form documentation say such "access to location is considered in the background"!?

  • The declaration form documentation also say a "foreground service" can use the "while in use" (foreground) permission if the "use has been initiated as a continuation of an in-app user-initiated action, and is terminated immediately after the intended use case of the user-initiated action is completed", but what if a BOOT_COMPLETED broadcast, AlarmManager or some other non user-initiated event starts the foreground service usage?

  • What should the prominent in-app disclosure include if the app doesn't collect nor share any data, it just do what the permission dialog already say, i.e. "access"? And how do i know which features to include in the disclosure when the API documentation doesn't even tell which actually use it, except the GMS Geofencing API?

Top answer
1 of 4
5

I've looked into this recently, and what I noted down is

  • it's an install-time permission; you do not request it at runtime with requestPermissions

  • "On Android 11 (API level 30) and higher, if your app starts a foreground service while running in the background," the service cannot access location, unless the user has granted the ACCESS_BACKGROUND_LOCATION permission to your app.

  • So, let's say a user of your app presses a button, and it starts a foreground service that requires location access. For that, you wouldn't need this permission, because you start the service while the app is not in the background.

  • An app is considered to be running in the background as long as each of the following conditions are satisfied:

    • None of the app's activities are currently visible to the user.

    • The app isn't running any foreground services that started while an activity from the app was visible to the user.

  • As I understand it, as long as you start a foreground service while the app is in the foreground, you don't need this permission, because the user will already have permitted foreground access to their location, f.e. with ACCESS_FINE_LOCATION

This is my take on it, but I might be wrong.

Oh and if you end up needing this permission after all, you also have to add android:foregroundServiceType="location" to your service in the manifest.

2 of 4
2

Foreground service may work without background permission obviously. That includes nested triggered events like repeating AlarmManager alerts and anything launched by its activity - as long as the foreground service exist in form of notification.

The situation where you need it is when the launch was triggered by remote notification like FCM (in case if the service was reanimated after being killed in doze mode or low memory or phone long inactivity or reboot or whatever). This is extremely useful functionality when continuous tracking is mandatory but other means of communications are limited or impossible. After all your server may as well send a email to the user to notify their service is down after their location wasn't updated for a while.

edit: BOOT_COMPLETED launch is also considered "background". User has to launch foreground service via apps interface i.e. activity for it to be truly "foreground". A bit counter-intuitive.

🌐
Notificare
notificare.com › blog › 2024 › 01 › 26 › android-location-permission-guide
Android Location Permission Guide | Notificare
January 26, 2024 - Foreground location access can be either Approximate or Precise. For most scenarios, you should include both permissions in the request. Check if the permission is granted before making the request:
🌐
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 - For using foreground and background location in lower versions of Android 11, we can take permission ACCESS_FINE_LOCATION, this permission will be considered for both foreground and background but with Android 11 and above you have to take one ...
🌐
Android Developers
developer.android.com › about › versions › 10 › privacy › changes
Privacy changes in Android 10 | Android Developers
Unlike the ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION permissions, the ACCESS_BACKGROUND_LOCATION permission only affects an app's access to location when it runs in the background.
🌐
Pulsatehq
docs.pulsatehq.com › v2.8.2 › reference › android-permissions
Location Permission Implementation
Background location does not show a permission prompt, instead it takes the user the App Settings. Just like for foreground location we recommend explaining to users why your App needs background location before taking him to them to App Settings.
🌐
Timeero
help.timeero.com › android-how-to
Android: How to enable Background Location Permissions
Ensure your location permissions are set up correctly through the tracker checklist. Open Settings on your Android device. Scroll down and tap Apps & Notifications (or just Apps on some devices). Find and select the Timeero app to enable background location access.
🌐
GitHub
github.com › Woosmap › geofencing-android-sdk › blob › master › doc › EnablingLocation.md
geofencing-android-sdk/doc/EnablingLocation.md at master · Woosmap/geofencing-android-sdk
But, when granting access for location in background, the user also automatically grants access to location in the foreground. ... If a user who previously granted location permissions upgrades to Android Q, some permissions are inherited when upgrading location permissions in the background, depending on your app settings.
Author   Woosmap