Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 1.04 KB

README.md

File metadata and controls

32 lines (28 loc) · 1.04 KB

PermissionUtils (权限工具类)

依赖

Download

dependencies {
    compile 'com.conghuahuadan:permission:latestVersion'
}

使用

PermissionUtils.getInstance(this)
        .permission(PermissionConstants.PHONE,
                PermissionConstants.STORAGE,
                PermissionConstants.CAMERA,
                PermissionConstants.CONTACTS)
        .callback(new PermissionUtils.Callback() {
            @Override
            public void onGranted(List<String> permissionsGranted) {
            }

            @Override
            public void onDenied(List<String> permissionsDenied,
                                 List<String> permissionsDeniedForever) {
            }
        })
        .request();

参考