Document Location SDK for Android Guides Utility Tools Android 11 Permissions

Android 11 Permissions

This document describes the location permission changes introduced in Android 11 and provides guidance on how to adapt your application.

One-time Permission

In Android 11, when your app requests location permissions, the system dialog includes a Only this time option. If the user selects this option, the system grants your app a temporary, one-time permission.

Your app can continue to access location data while its Activity is visible.

If the user moves your app to the background, the system revokes this access after a short period.

If your app starts a foreground service while the Activity is visible, and the user then moves the app to the background, your app can continue to access location data until the foreground service stops.

If the user does not bring your app back to the foreground after access is revoked, or if the user manually revokes the one-time permission, the system terminates your app's process.

Background Location Access

When your app requests background location access, the system permission dialog no longer includes an Allow all the time option. This option is only available in the system Settings app's permission management page for your app. Additionally, your app must already have foreground location permission before it can request background location permission.

Adaptation Guide

If your app requires background location access, you must now follow a two-step process, as it is no longer possible to request background location permission directly without first obtaining foreground location permission.

1. Request foreground location permission: First, request the foreground location permission from the user.

2. Request background location permission: After obtaining foreground permission, request the background location permission. Guide the user to the system Settings app to grant this permission.