Wednesday, February 20, 2019

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


It is not possible to pragmatically open the permission screen. Instead, we can open app settings screen.
Code
Intent i = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:" + BuildConfig.APPLICATION_ID));
startActivity(i);
Sample Output
enter image description here

No comments:

Post a Comment