Java tutorial
//package com.java2s; import android.annotation.TargetApi; import android.app.Activity; import android.content.pm.PackageManager; import android.os.Build; import java.util.List; public class Main { @TargetApi(value = Build.VERSION_CODES.M) public static boolean hasNeverAskAgainPermission(Activity activity, List<String> permission) { for (String value : permission) { if (activity.checkSelfPermission(value) != PackageManager.PERMISSION_GRANTED && !activity.shouldShowRequestPermissionRationale(value)) { return true; } } return false; } }