PermissionCheckUtil

public class PermissionCheckUtil

Created by jiangecho on 2016/10/25.

Constructors

Link copied to clipboard
public void PermissionCheckUtil()

Types

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

Properties

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

Functions

Link copied to clipboard
public static boolean canDrawOverlays(Context context)

public static boolean canDrawOverlays(Context context, boolean needOpenPermissionSetting)
检查是否有悬浮窗权限
Link copied to clipboard
public static boolean checkMediaStoragePermissions(Context context)
Link copied to clipboard
public static boolean checkPermissionResultIncompatible(Array<String> permissions, Array<int> grantResults)
权限授权回调参数匹配性检测.
Link copied to clipboard
public static boolean checkPermissions(Context context, Array<String> permissions)
Link copied to clipboard
public static Array<String> getMediaStoragePermissions(Context context)
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)
Link copied to clipboard
设置申请权限前拦截监听
Link copied to clipboard
public static void showRequestPermissionFailedAlter(Context context, Array<String> permissions, Array<int> grantResults)