EasyPermission动态申请权限

1.build.gradle

    compile'pub.devrel:easypermissions:0.1.7'

2.implements EasyPermissions.PermissionCallbacks

    override

    (1) onRequestPermissionsResult(intrequestCode,@NonNullString[] permissions,@NonNullint[] grantResults)     

        处理请求权限:EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults,this);


EasyPermission动态申请权限_第1张图片


(2) onPermissionsGranted(intrequestCode, List perms)

    (3) onPermissionsDenied(intrequestCode, List perms)


参考代码:https://github.com/MrXiong/ZxZxingPro

你可能感兴趣的:(EasyPermission动态申请权限)