This question already has an answer here:
- How to programmatically open the Permission Screen for a specific app on Android Marshmallow? 11 answers
I'm working on new permission model (Android 6.0 Marshmallow) and I wonder is there a way to open the application's permission window programmatically?
not only application details
I managed to open the second screen using something like this
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);
}
But I have no idea how to open the first one.
Your help will be much appreciated :)