4

I want to show all apps and permissions via list from the system to the user. I know that this setting available for API >= 23 in different locations.

For API >= 26 it is on:

Settings / Apps & Notifications / Advanced / App permissions

For API >= 23 it is on:

Settings / Apps / Configure Apps (Setting menu item) / App permissions

Is there any way to open App permissions screen using intent?

Android App permissions settings

Metehan Toksoy
  • 1,885
  • 3
  • 22
  • 39
  • @NileshRathod not related to that one, check the screenshot that I attached to the question, please. I do not want to open my apps settings, I want to open the "App permissions" screen to the user. – Metehan Toksoy Oct 11 '18 at 11:17

2 Answers2

5

Maybe you will be lucky and someone can prove me wrong, but it seems on recent version of Android you are limited to App Settings only - no direct access to App Permissions via Intent.

I believe this is related to Security and Automation which would also align with Googles decision to show an 'overlay detected' warning when trying to request permissions as outlined on this non-Google article

Nick Cardoso
  • 20,807
  • 14
  • 73
  • 124
3
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O) {
    final AlertDialog.Builder adb = new AlertDialog.Builder(this);
    adb.setTitle("App permissions");
    adb.setMessage("Click on ok then app will redirect to app settings then please click on Other Permissions and Please Allow All");
    adb.setPositiveButton("ok", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialogInterface, int i) {

            Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
            Uri uri = Uri.fromParts("package", getPackageName(), null);
            intent.setData(uri);
            startActivity(intent);
        }
    });
    adb.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            finishAffinity();
            dialogInterface.dismiss();
        }
    });
    adb.show();
}
Seraphim's
  • 12,559
  • 20
  • 88
  • 129