How to open app permission Settings in MIUI devices programmatically?

前端 未结 2 1466
自闭症患者
自闭症患者 2020-12-09 23:39

I want to open the screen like this: Settings -> Apps -> Select an app -> Open App permissions screen.

Currently I used this code. It lets me open t

2条回答
  •  轮回少年
    2020-12-10 00:11

    Try this solution

    Intent intent = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
    intent.setClassName("com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity");
    intent.putExtra("extra_pkgname", "app_package_name");
    

提交回复
热议问题