As described on the privacy best practices page, apps should only ask for the type of location permission that's critical to the user-facing feature, and properly disclose this to users. The majority of use cases only require location when the user is engaging with the app. If your app requires background location, such as when implementing geofencing, make sure that it's critical to the core functionality of the app, offers clear benefits to the user, and is done in a way that's obvious to them.
Background location access checklist
Use the following checklist to identify potential location access logic in the background:
- If your app targets Android 10 (API level 29) or higher, also check for
ACCESS_BACKGROUND_LOCATIONpermission. Verify that your app has a feature that requires it.
- If your app targets Android 10 (API level 29) or higher, also check for the
If your app uses an SDK or library that accesses location, this access is attributed to your app. To determine whether an SDK or library needs location access, consult the library's documentation.
Evaluate background location access
If you find that your app accesses location in the background, consider taking the following actions:
- Evaluate whether background location access is critical to the core functionality of the app.
- If you don't need location access in the background, remove it. If your app
targets Android 10 (API level 29) or higher, remove the
ACCESS_BACKGROUND_LOCATIONpermission from your app's manifest. When you remove this permission, all-the-time access to location isn't an option for the app on devices that run Android 10, which further signifies to users that the app cannot access location in the background.
- Provide a prominent disclosure of location usage in your app, especially for cases that aren't obvious to users.
- If possible, refactor your location access logic. For example, request location only when your app's activity is visible to users.
Limited updates to background location
If background location access is essential for your app, keep in mind that Android preserves device battery life by setting background location limits on devices that run Android 8.0 (API level 26) and higher. On these versions of Android, if your app is running in the background, it can receive location updates only a few times each hour. Learn more about background location limits.