小编Kar*_*icz的帖子

如何以编程方式在应用设置中打开应用程序权限窗口

我正在研究新的权限模型(Android 6.0 Marshmallow),我想知道有没有办法以编程方式打开应用程序的权限窗口?

应用权限

不仅是申请细节

应用设置

我设法用这样的东西打开第二个屏幕

private void goToSettings() {
    Intent myAppSettings = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:" + getPackageName()));
    myAppSettings.addCategory(Intent.CATEGORY_DEFAULT);
    myAppSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(myAppSettings);
}
Run Code Online (Sandbox Code Playgroud)

但我不知道如何打开第一个.

非常感谢您的帮助:)

permissions android android-settings android-6.0-marshmallow

32
推荐指数
1
解决办法
2万
查看次数