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.ArrayList; import java.util.List; public class Main { @TargetApi(value = Build.VERSION_CODES.M) public static List<String> findDeniedPermissions(Activity activity, String... permission) { List<String> denyPermissions = new ArrayList<>(); for (String value : permission) { if (activity.checkSelfPermission(value) != PackageManager.PERMISSION_GRANTED) { denyPermissions.add(value); } } return denyPermissions; } }