mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: add background location prominent disclosure to address Google Play rejection
This commit is contained in:
parent
28a71d89a9
commit
ab86e4741f
1 changed files with 12 additions and 1 deletions
|
|
@ -211,7 +211,18 @@ fun MapView(
|
|||
}
|
||||
|
||||
fun requestPermissionAndToggle() {
|
||||
requestPermissionAndToggleLauncher.launch(context.getLocationPermissions())
|
||||
// Google rejects releases claiming this requires BACKGROUND_LOCATION prominent
|
||||
// disclosure. Adding to comply even though it does not use background location.
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.background_required)
|
||||
.setMessage(R.string.why_background_required)
|
||||
.setNeutralButton(R.string.cancel) { _, _ ->
|
||||
debug("User denied location permission")
|
||||
}
|
||||
.setPositiveButton(R.string.accept) { _, _ ->
|
||||
requestPermissionAndToggleLauncher.launch(context.getLocationPermissions())
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
val nodes by model.nodeList.collectAsStateWithLifecycle()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue