Location Permission is a permission that a mobile application requests from the user to access data about their geographical location. Without this permission, the application cannot determine the device coordinates, and therefore cannot provide geolocation features. According to Apple Developer Documentation, 2024, all applications using geolocation services must request explicit user consent through a system dialog.
Key Takeaways
Location Permission is an operating system mechanism that regulates application access to data about the device’s geographical location. Without explicit user consent, the application cannot obtain GPS coordinates, Wi-Fi network data, or cellular tower information.
Mobile platforms Android and iOS implement their own permission systems, but the general logic is the same: the application declares the necessary permissions in the manifest or configuration file, then requests them at runtime. According to Android Developers, 2024, starting from Android 10, all geolocation permissions belong to the dangerous category and require runtime requests.
The reason for this approach is user privacy protection. Location data can be used to build travel routes, determine places of work and leisure, and identify individuals. Therefore, both platforms require transparent explanation in the request dialog: the application must state the reason why it needs access to geolocation.
Location Permission is necessary for any application whose functionality depends on knowing the user’s physical location. Maps and navigation, delivery apps, weather services, social networks with geotagging — all these categories of software require Location Permission.
Without this permission, the application cannot determine device coordinates by any available method: neither through the GPS module, nor through Wi-Fi scanning, nor through cellular tower positioning. The user can revoke the permission at any time in the system settings, after which the application must handle the denial gracefully.
According to a study by Pew Research Center (2024), about 45% of users revoke geolocation access in applications that do not use it for their core functionality. This means that developers need to clearly justify the request and offer alternative mechanics for those who declined Location Permission.
GDPR in Europe and Federal Law 152-FZ in Russia require obtaining informed consent for processing location data. The application must not only request permission through the system dialog but also provide a separate notice about the purposes of data collection. Violation of these requirements entails fines of up to 20 million euros or 4% of the company’s annual turnover.
If the application does not request Location Permission or the user denies access, the developer must provide a fallback scenario. For a mapping application, this could be manual address entry; for a delivery app — selection from a list of saved addresses; for a weather service — city determination by IP address. Graceful degradation is a standard practice recommended by Google and Apple.
Location access levels differ on Android and iOS, although the general idea is the same: the more precise the access, the stricter requirements the platform imposes on the application.
| Access Level | Android | iOS |
|---|---|---|
| While Using | Only when the app is active | When In Use — only in the app |
| Background | Always — constantly, even in the background | Always — requires additional App Store review |
| Approximate | ACCESS_COARSE_LOCATION (accuracy up to 500 m) | With Precision = Off option (iOS 14+) |
ACCESS_FINE_LOCATION provides access to precise GPS coordinates with an accuracy of up to several meters. To declare this permission in the manifest, the constant android.permission.ACCESS_FINE_LOCATION is used. ACCESS_COARSE_LOCATION, in turn, provides approximate location with an accuracy of up to 500 meters based on Wi-Fi and cellular tower data.
When In Use allows the application to receive coordinates only when it is open on the screen. Always provides access to geolocation even in the background, but requires mandatory App Store review. Starting from iOS 14, the user can separately disable precise positioning for each application using the Precision toggle.
Requesting Location Permission on Android is done in two stages: declaring permissions in the manifest and runtime request in code. Starting from Android 6.0 (API 23), all dangerous permissions are requested during application runtime, not at installation.
The first step is to add the necessary permissions to the AndroidManifest.xml file. Different constants are used for precise and approximate positioning.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
After declaring in the manifest, the system permission request dialog must be called in the application code. Let’s look at an example in Kotlin using the Activity Result API.
private val locationPermissionRequest =
registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { permissions ->
when {
permissions.getOrDefault(Manifest.permission.ACCESS_FINE_LOCATION, false) -> {
// Permission granted
getLocation()
}
permissions.getOrDefault(Manifest.permission.ACCESS_COARSE_LOCATION, false) -> {
// Approximate location only
getCoarseLocation()
}
else -> {
// User denied
showLocationExplanation()
}
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
checkLocationPermission()
}
If the user denies access, the Android system does not allow showing the dialog again automatically. The developer needs to call shouldShowRequestPermissionRationale to display a preliminary explanation. In case of a repeated denial with the Never Ask Again flag, the user should be redirected to system settings.
private fun checkLocationPermission() {
when {
ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) ==
PackageManager.PERMISSION_GRANTED -> {
getLocation()
}
ActivityCompat.shouldShowRequestPermissionRationale(this,
Manifest.permission.ACCESS_FINE_LOCATION) -> {
showRationaleDialog {
requestLocationPermission()
}
}
else -> {
openAppSettings()
}
}
}
Requesting Location Permission on iOS requires adding special keys to the Info.plist file and calling methods of the CLLocationManager class. Apple places special emphasis on privacy, so the explanation text in the request dialog must be as specific as possible.
To request location on iOS, you need to add one or both keys to Info.plist: NSLocationWhenInUseUsageDescription for access while using the app and NSLocationAlwaysAndWhenInUseUsageDescription for background access. The value of each key is a string that will be shown to the user in the dialog.
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your app needs your location to display nearby points on the map.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Your app needs background location access to track your route.</string>
In Swift code, the request is made through an instance of CLLocationManager. Depending on the required access level, requestWhenInUseAuthorization or requestAlwaysAuthorization is called.
import CoreLocation
class LocationManager: NSObject, CLLocationManagerDelegate {
private let manager = CLLocationManager()
func requestLocationAccess() {
manager.delegate = self
manager.requestWhenInUseAuthorization()
}
func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
switch manager.authorizationStatus {
case .authorizedWhenInUse, .authorizedAlways:
startLocationUpdates()
case .denied, .restricted:
showSettingsAlert()
case .notDetermined:
break
}
}
}
Unlike Android, iOS does not provide the developer with a method to check shouldShowRequestPermissionRationale. The system itself decides when to show the explanation. Additionally, on iOS, the user can only change permission through system settings — the application cannot re-display the system dialog after the user has made a choice. RequestAlwaysAuthorization first requests When In Use, and then, after receiving the first consent, a separate dialog for background access.
Best practices for working with Location Permission help reduce user denials and meet app store requirements. Google and Apple have published recommendations that increase the likelihood of app approval.
Do not show the Location Permission request dialog immediately when the application starts. A user who has just opened the app does not yet understand why they need to provide geolocation access. Contextual request means that the dialog appears at the moment when the user actually needs a feature that requires permission. For example, when clicking the “Find nearest store” button.
Before the system dialog, show your own pre-permission screen. On it, explain why the app needs geolocation, what data is collected, and how it will be used. After the user clicks “Allow” on your screen, show the system dialog. According to Appsflyer (2024), this approach increases approval conversion by 25-35%.
Background geolocation access is only needed for apps that work in the background: navigators, activity trackers, delivery apps. If your app only needs coordinates when the screen is open, request When In Use. The App Store will reject the app if Always is not functionally justified. On Android, background access is additionally regulated through the ACCESS_BACKGROUND_LOCATION permission.
Frequently Asked Questions
The application must properly handle the denial and offer an alternative scenario. For example, manual address entry or city determination by IP address. The system dialog will not be shown again — the user must be redirected to settings.
Technically, yes — the system dialog can be triggered without a preliminary screen. However, the approval conversion without explanation is 30-40%, while with a preliminary screen it is 60-75%. Apple and Google recommend always explaining the reason for the request.
Use ContextCompat.checkSelfPermission with the constant Manifest.permission.ACCESS_FINE_LOCATION. The method returns PERMISSION_GRANTED or PERMISSION_DENIED, allowing you to determine the current status without calling the system dialog.
ACCESS_FINE_LOCATION provides access to precise GPS coordinates with an accuracy of 3-10 meters. ACCESS_COARSE_LOCATION provides approximate location with an accuracy of up to 500 meters based on Wi-Fi and cellular towers. On Android 12+, the developer can request both permissions simultaneously.
On Android, BLE device scanning requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION because BLE signals can be used for position triangulation. On iOS, BLE only requires Bluetooth permission — Location Permission is not needed.
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.
Read also