# From Permissions to Sessions: Rethinking Location Access in Android 17

DevFeed: [From Permissions to Sessions: Rethinking Location Access in Android 17](<https://devfeed.tech/articles/from-permissions-to-sessions-rethinking-location-access-in-android-17-22946.md>)

Original publisher: [Read original article](<https://proandroiddev.com/from-permissions-to-sessions-rethinking-location-access-in-android-17-5a13124b777d?source=rss----c72404660798---4>)

Author: Nav Singh

Published: 2026-09-09T01:15:51Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [android-permissions](<https://devfeed.tech/topics/android-permissions.md>), [Android](<https://devfeed.tech/topics/android.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-17](<https://devfeed.tech/tags/android-17.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [android-permissions](<https://devfeed.tech/tags/android-permissions.md>), [android17](<https://devfeed.tech/tags/android17.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [button](<https://devfeed.tech/tags/button.md>), [compose](<https://devfeed.tech/tags/compose.md>), [consent](<https://devfeed.tech/tags/consent.md>), [feature](<https://devfeed.tech/tags/feature.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implement](<https://devfeed.tech/tags/implement.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [layout](<https://devfeed.tech/tags/layout.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [library](<https://devfeed.tech/tags/library.md>), [location](<https://devfeed.tech/tags/location.md>), [permission](<https://devfeed.tech/tags/permission.md>), [permissions](<https://devfeed.tech/tags/permissions.md>), [sessions](<https://devfeed.tech/tags/sessions.md>)

## AI overview

Android 17's system-rendered LocationButton is presented as a way to request precise location for the current session through system-managed consent. The excerpt's setup declares USE_LOCATION_BUTTON and coarse/fine location permissions, marks ACCESS_FINE_LOCATION with onlyForLocationButton, adds the androidx.core.locationbutton:locationbutton-compose library (shown as 1.0.0-alpha01), and uses its LocationButton composable to handle grant or denial callbacks. The library uses remote system rendering on Android Cinnamon Bun (API 37) and later, with a local Compose fallback on older versions or if remote rendering fails. The excerpt also shows optional styling for colors, outlines, size, and corner radii.

## Source excerpt

Image generated using Gemini In this article, we will learn how to implement the new 📍Location button introduced in Android 17 in Jetpack Compose-based Android applications. Android 17 adds a system-rendered 📍Location Button that we can drop into the layout via a Jetpack library, and tapping it gives the app precise location for that session only, gated by a new USE_LOCATION_BUTTON permission. What the feature is Android now exposes a system-owned, standard location button that we can embed in our UI instead of designing a custom control. When the user taps it, the system handles the permission flow, then grants the app precise location for the current session only, rather than long-lived access. How it changes permissions Instead of immediately requesting ACCESS_FINE_LOCATION (and maybe ACCESS_COARSE_LOCATION) at runtime, we declare the new USE_LOCATION_BUTTON permission to host the button. <!-- Standard Coarse and Fine Location Permissions + onlyForLocationButton --> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:usesPermissionFlags="onlyForLocationButton"/> <!-- Required system permission for rendering the LocationButton --> <uses-permission android:name="android.permission.USE_LOCATION_BUTTON" />Developer benefits Less custom permission boilerplate: We lean on system UX and the Jetpack library for the hardest parts of location consent. [versions] locationbuttonCompose = "1.0.0-alpha01" [libraries] androidx-locationbutton-compose = { group = "androidx.core.locationbutton", name = "locationbutton-compose", version.ref = "locationbuttonCompose" } Higher trust and clarity for users: the control looks and behaves consistently across apps, and session-only precise access is easier to understand than broader access. Implementation As we all know, Android development is now Compose-first, so we will implement it using the LocationButton composable provided by th