To enable "Allow all the time" location permissions in an Android app, how to launch the location settings for the app in the Android settings?
I have seen how to launch the Android settings page for location (all apps), and how to launch the settings for a specific app, but not how to deep link to the location settings for a specific app.
This is what I currently have:
fun openAppLocationSettings(context: Context) {
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
val packageName = context.packageName
val uri = Uri.fromParts("package", packageName, null)
intent.data = uri
context.startActivity(intent)
}
but it only shows the root page of the app Settings.