且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

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

更新时间:2023-10-11 21:47:34

这是不可能的.您可以打开应用程序设置"屏幕,但不能打开权限设置屏幕.

This is not possible. You can open the App settings screen but not the permissions setting screen.

请参阅此问题以获取更多说明.

Refer to this question for more explanations.

我在这里共享代码以打开应用程序设置屏幕,

Here I am sharing code to open application setting screen,

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

有关更多信息,您可以参考打开Android应用程序设置屏幕

For more you can refer Open Application Settings Screen Android