I know there is many question about it already.
But today I found this:
My phone is Gallaxy Note 4 and Samsung Gallery app works just as I want 'open App permissions page from Activity!' not setting-detail page.
Anyone knows how to do that?
Here is a method to open Settings > Permissions for your application:
public static void openPermissionSettings(Activity activity) {
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.parse("package:" + activity.getPackageName()));
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(intent);
}
You should consider using this when your permission is denied and shouldShowRequestPermissionRationale(Activity activity, String permission)
returns true.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With