# 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 - Medium](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [android-development](<https://devfeed.tech/topics/android-development.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [android](<https://devfeed.tech/tags/android.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>), [compose](<https://devfeed.tech/tags/compose.md>), [development](<https://devfeed.tech/tags/development.md>), [feature](<https://devfeed.tech/tags/feature.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [permission](<https://devfeed.tech/tags/permission.md>)

## AI overview

A tutorial on implementing Android 17's system-rendered Location Button in Jetpack Compose. The button uses the USE_LOCATION_BUTTON permission and grants precise location for the current session, with local rendering fallback on older Android versions or when remote rendering fails.

## 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