Open permissions manager settings page

Viewed 323

I try to open the permission manager screen from the settings but I don't found the good Intent.

I try :

startActivity(Intent(Settings.ACTION_PRIVACY_SETTINGS))

But it open the Privacy page of the settings and if I want to show the permission manager screen, I have to click on the sub-element "Permission manager" : enter image description here

I want to open this page : enter image description here

How can I do ?

3 Answers

It isn't possible to open settings for permissions, reason is defined in this link https://stackoverflow.com/a/52759143/5890471

However you can take permissions from the user in a traditional way by ActivityCompat.requestPermissions(this, new String[]{permissionName}, permissionRequestCode); and define your required permissions in manifest!

Hope the answer to the question :)

You can't open permissions page directly. However, you can use Intents to open the app's settings screen, from which, you can open the permission settings with one click:

Kotlin:

startActivity(Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
    data = Uri.fromParts("package", packageName, null)
})

Java:

Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
Uri uri = Uri.fromParts("package", getPackageName(), null);
intent.setData(uri);
startActivity(intent);

cr: How to programmatically open the Permission Screen for a specific app on Android Marshmallow?

Related