Skip to content

A small and easy to use (<20KB) Android runtime permission library, compatible with Android O.(一款小巧易用的(<20KB)Android运行时权限框架,兼容Android O。)

License

Notifications You must be signed in to change notification settings

uestccokey/EZPermission

Repository files navigation

Logo

EZPermission

A small and easy to use (<20KB) Android runtime permission library, compatible with Android O

中文

Features

1.Support check the availability of permissions

2.Support the callback mode to apply for permissions

3.Support batch apply for permissions

4.Support Android O

Sample

Check whether permissions are available

boolean available = EZPermission.permissions(Permission.CAMERA, Permission.STORAGE...)
                        .available(context);

Apply for permission

EZPermission.permissions(Permission.CAMERA, Permission.STORAGE...)
    .apply(context, new PermissionCallback() {
        @Override
        public void onPermissionGranted(String[] grantedPermissions) {
            // agree
        }

        @Override
        public void onPermissionDenied(String[] deniedPermissions, boolean isNoLongerPrompted) {
            // refuse
        }

        @Override
        public void onAllPermissionsGranted() {
            // agree all
        }
});

About

A small and easy to use (<20KB) Android runtime permission library, compatible with Android O.(一款小巧易用的(<20KB)Android运行时权限框架,兼容Android O。)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published