Establishing clear guidelines for device location data access is critical to building user trust and maintaining a safe ecosystem. This article details the requirements for apps' use of the new Android location button, as well as the standard use of foreground device location (ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION). Access to the location in the foreground happens while an app is open and visible to the user. If the access happens after a user closes the app or uses the home button to return to their main screen, then the app’s access to the location is in the background.
There can be some cases where we approve an app's use of foreground service, a separate API that lets an app access location information even when the app is minimized and not visible to the user. But these are subject to separate review and must meet key requirements outlined in the Permissions for Foreground Services policy.
What does this mean for our Location Permissions policy? Accessing location in the foreground is the most transparent approach for users, which promotes trust and makes it the preferred method for apps on Google Play. Utilizing the Android location button offers an extra layer of privacy and control, ensuring your app meets the minimum scope requirements.
Overview: Minimum Scope for Location Access
To safeguard user privacy, Google Play requires all apps to request the minimum permission scope necessary to provide their core functionality. Please regard the following dimensions when scoping device location:
- Precision: Use coarse location (
ACCESS_COARSE_LOCATION) if your feature does not strictly require fine-grained accuracy. - Persistence: For one-time or infrequent needs, apps must transition from "persistent by default" to transactional access via the location button.
Background vs. Foreground: This article covers foreground access. If your app requires location while the app is not in use, refer to the background location requirements.
Example use cases where coarse device location may be required:
- Localized Content & Discovery
- Local News & Trends: Surfacing "News in Chicago" or "Trending in San Francisco" doesn't require knowing a user's exact street address.
- Regional Event Discovery: Finding festivals, concerts, or farmers' markets happening in a city or neighborhood.
- Coarse Weather Services: Regional weather tends to remain accurate whether the user is at home or three blocks away at a cafe.
- Social & Community
- Local Marketplaces: For classified listing apps, showing items for sale "within 5 miles" provides enough utility for a buyer without revealing the seller's exact location until they choose to share it.
- General "People Nearby": Showing that a friend is “in your city” for social apps, rather than providing a real-time pin on a map.
- Utility & Optimization
- Time Zone Detection: Automatically updating a device clock based on the city or region.
- Store Locators: Showing the nearest branches of a national retail chain or bank. While precise location helps for "walking directions," a coarse location is sufficient to show the three closest stores in a 10-mile radius.
- Personalization & Privacy
- Targeted Promotions: Offering a coupon for a grocery chain that has multiple locations in a city.
- Language & Culture: Automatically setting the app language or currency based on the user's broad region or country.
The Android Location Button (Mandatory for Android 17+)
For apps targeting Android 17 (API level 37) and higher, the Android location button is the required minimum scope method for obtaining precise location for "transactional" (one-time) use cases.
Why is the location button required?
- Privacy-First: It grants precise location for a single session only, expiring as soon as the app session is closed.
- User Intent: It creates a clear, predictable experience where users know exactly when and why their location is being shared.
- Reduced Friction: It eliminates the need for complex runtime permission dialogs for simple tasks like finding a nearby store or tagging a photo.
When is the location button Required?
For apps targeting Android 17+, the button is mandatory for transactional use cases where precise location is only needed momentarily. Common examples include:
- Search Nearby: Finding stores, ATMs, or restaurants near the user.
- One-time Sharing: Sending a current location to a friend in a messaging app.
- Location Tagging: Attaching a location to user-generated content like photos or social posts.
- Address Pickers: Helping users autofill a delivery address.
Example Implementation (Manifest)
If your app only requires precise location via the button, you must declare it in your AndroidManifest.xml using the onlyForLocationButton attribute:
XML
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:onlyForLocationButton="true" /> |
For technical details, please consult the API documentation.
Requirements for Precise Foreground Location Permission
Apps that require precise, persistent access to ACCESS_FINE_LOCATION (and are not required to use the location button) must meet the following criteria:
- Core Functionality: Access must be essential to deliver the main purpose of the app or major product feature as promoted in your Store listing.
- Specific Policy Prohibitions: Location permissions may not be requested for the sole purpose of advertising or analytics, and device location data may never be sold.
Play Console Declaration
All apps requesting precise location (ACCESS_FINE_LOCATION) must complete a declaration in the Play Console to demonstrate access needs and justify why the location button or coarse location is insufficient.
Next Steps & Best Practices
- Audit your code: Identify if your app targets Android 17+ and uses precise location for one-time tasks.
- Implement the flag: If the button is required, utilize the onlyForLocationButton flag in your manifest.
- Review the UI: Ensure your button follows Android design guidelines for consistency.
Frequently Asked Questions (FAQs)
When will the location button requirements be enforced?
Are existing apps exempt from these requirements, or can they be granted an extension until they release an update?
Can I still use the standard ACCESS_FINE_LOCATION permission?
What are the primary use cases for the location button versus precise permission?
Does the location button work for background location?
Related content
- Learn more about declaring permissions in Google Play Console.
- Learn more about building location-aware apps on the Android Developers site.
- Learn more about permissions and the workflow for using permissions on the Android Developers site.
- Learn more about privacy best practices on the Android Developers site.
- Read our User Data policy.
Learn more about how to stay compliant with Google Play device location policies in the Academy for App Success.