Location Permission

Foreground Location Permission and Background Limits

ACCESS_COARSE_LOCATION gives an approximate position (about 3 square kilometers), and ACCESS_FINE_LOCATION a precise one. Since Android 12 the user may pick approximate even when you ask for precise, so request both and accept either; a nearest-shop feature works with approximate:

location/NearestBranchScreen.kt: asking for either accuracy (excerpt)Kotlin
  val ask = rememberLauncherForActivityResult(
    ActivityResultContracts.RequestMultiplePermissions()
  ) { result ->
    Log.d(TAG, "granted: $result")
    allowed = result.values.any { it }                    // approximate is enough
  }

These cover foreground use: a visible activity, or a foreground service with foregroundServiceType="location". Background use (a worker, a geofence) also needs ACCESS_BACKGROUND_LOCATION, which since Android 11 only the settings page ("Allow all the time") grants. Background apps get only a few updates an hour (Android 8+), and Google Play 1 approves the permission only when it is core to the app. BookNest doesn't declare it.