# PermissionCheckUtil

public class PermissionCheckUtil

Created by jiangecho on 2016/10/25.

## Constructors

PermissionCheckUtil
Link copied to clipboard
public void PermissionCheckUtil()

## Types

IPermissionEventCallback
Link copied to clipboard
public interface IPermissionEventCallback
权限申请原因解释Dialog的确定和取消的按钮事件通知.
IRequestPermissionListListener
Link copied to clipboard
public interface IRequestPermissionListListener
SDK申请权限前,用户可以设置此监听，在`onRequestPermissionList`方法实现中创建Dialog弹窗,用于向用户解释权限申请的原因.

## Properties

REQUEST_CODE_ASK_PERMISSIONS
Link copied to clipboard
public final static int REQUEST_CODE_ASK_PERMISSIONS
REQUEST_CODE_LOCATION_SHARE
Link copied to clipboard
public final static int REQUEST_CODE_LOCATION_SHARE

## Functions

canDrawOverlays
Link copied to clipboard
public static boolean canDrawOverlays(Context context)
public static boolean canDrawOverlays(Context context, boolean needOpenPermissionSetting)
检查是否有悬浮窗权限
checkMediaStoragePermissions
Link copied to clipboard
public static boolean checkMediaStoragePermissions(Context context)
checkPermissionResultIncompatible
Link copied to clipboard
public static boolean checkPermissionResultIncompatible(Array<String> permissions, Array<int> grantResults)
权限授权回调参数匹配性检测.
checkPermissions
Link copied to clipboard
public static boolean checkPermissions(Context context, Array<String> permissions)
getMediaStoragePermissions
Link copied to clipboard
public static Array<String> getMediaStoragePermissions(Context context)
requestPermissions
Link copied to clipboard
public static boolean requestPermissions(Activity activity, Array<String> permissions)
public static boolean requestPermissions(Fragment fragment, Array<String> permissions)
public static boolean requestPermissions(Activity activity, Array<String> permissions, int requestCode)
public static boolean requestPermissions(Fragment fragment, Array<String> permissions, int requestCode)
setRequestPermissionListListener
Link copied to clipboard
public static void setRequestPermissionListListener(PermissionCheckUtil.IRequestPermissionListListener listener)
设置申请权限前拦截监听
showRequestPermissionFailedAlter
Link copied to clipboard
public static void showRequestPermissionFailedAlter(Context context, Array<String> permissions, Array<int> grantResults)