Stay organized with collections
Save and categorize content based on your preferences.
To further protect user privacy, Android 11 adds one-time
location access and changes how users grant background location access. These
updates affect all apps that run on Android 11 and higher.
One-time access
Figure 1. System dialog for the foreground location
permission includes an option called Only this time.
On Android 11 and higher, whenever your app requests access to
foreground location, the system
permissions dialog includes an option called Only this time, as shown in
figure 1. This option give users more control over when an app can access
location information.
Android 11 changes how a feature in your app can gain access to
background location. This section
describes each of these changes.
If a feature in your app accesses location from the background, verify that such
access is necessary. Consider getting the information that the feature needs in
other ways, as described on the page about how to access
location in the background.
Request background location separately
As described in the guide on how to request location access at
runtime, you
should perform incremental location requests. If your app targets
Android 11 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.
Permission dialog changes
Change details
Change Name: BACKGROUND_RATIONALE_CHANGE_ID
Change ID: 147316723
How to toggle
As you test your app's compatibility with Android 11, you can toggle this change on or off
using the following ADB commands:
adb shell am compat enable (147316723|BACKGROUND_RATIONALE_CHANGE_ID) PACKAGE_NAMEadb shell am compat disable (147316723|BACKGROUND_RATIONALE_CHANGE_ID) PACKAGE_NAME
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.
Additional resources
For more information about accessing background location, view the following
materials:
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[],[],null,["To further protect user privacy, Android 11 adds one-time\nlocation access and changes how users grant background location access. These\nupdates affect all apps that run on Android 11 and higher.\n\nOne-time access \n**Figure 1.** System dialog for the foreground location permission includes an option called **Only this time**.\n\nOn Android 11 and higher, whenever your app requests access to\n[foreground location](/training/location/permissions#foreground), the system\npermissions dialog includes an option called **Only this time**, as shown in\nfigure 1. This option give users more control over when an app can access\nlocation information.\n\nLearn more about how the system handles [one-time\npermissions](/guide/topics/permissions/overview#one-time).\n\nBackground location access\n\nAndroid 11 changes how a feature in your app can gain access to\n[background location](/training/location/permissions#background). This section\ndescribes each of these changes.\n\nIf a feature in your app accesses location from the background, verify that such\naccess is necessary. Consider getting the information that the feature needs in\nother ways, as described on the page about how to [access\nlocation in the background](/training/location/background).\n\nRequest background location separately\n\nAs described in the guide on how to [request location access at\nruntime](/training/location/permissions#request-location-access-runtime), you\nshould perform incremental location requests. If your app targets\nAndroid 11 or higher, the system enforces this best practice. If\nyou request a foreground location permission and the background location\npermission at the same time, the system ignores the request and doesn't grant\nyour app either permission.\n\nPermission dialog changes \n\nChange details\n\n**Change Name** : `BACKGROUND_RATIONALE_CHANGE_ID`\n\n**Change ID** : `147316723`\n\nHow to toggle\n\nAs you test your app's compatibility with Android 11, you can toggle this change on or off\nusing the following ADB commands: \n\n adb shell am compat enable (\u003cvar translate=\"no\"\u003e147316723\u003c/var\u003e|\u003cvar translate=\"no\"\u003eBACKGROUND_RATIONALE_CHANGE_ID\u003c/var\u003e) \u003cvar translate=\"no\"\u003ePACKAGE_NAME\u003c/var\u003e\n adb shell am compat disable (\u003cvar translate=\"no\"\u003e147316723\u003c/var\u003e|\u003cvar translate=\"no\"\u003eBACKGROUND_RATIONALE_CHANGE_ID\u003c/var\u003e) \u003cvar translate=\"no\"\u003ePACKAGE_NAME\u003c/var\u003e\n\nFor more information about the compatibility framework and toggling changes, see\n[Test and debug platform behavior changes in\nyour app](/guide/app-compatibility/test-debug).\n\nWhen a feature in your app requests background location on a device that runs\nAndroid 11 or higher, the system dialog doesn't include a button\nto enable background location access. In order to enable background location\naccess, users must set the **Allow all the time** option for your app's location\npermission on a settings page, as described in the guide on how to [Request\nbackground location](/training/location/permissions#request-background-location).\n\nAdditional resources\n\nFor more information about accessing background location, view the following\nmaterials:\n\nVideos\n\n- [How to find possible background location\n usage](https://www.youtube.com/watch?v=xTVeFJZQ28c)"]]