1 Introducing dependencies

Dependencies {the compile 'com. Making. Dfqin: grantor: 2.5'}Copy the code

For example, dynamically obtain access to the camera, of course, in the manifest file to declare \

private void requestCemera() { PermissionsUtil.requestPermission(getApplication(), new PermissionListener() { @Override public void permissionGranted(@NonNull String[] permissions) { Toast.maketext (mainactivity.this, "Access camera ", toast.length_long).show(); } @Override public void permissionDenied(@NonNull String[] permissions) { Toast.makeText(MainActivity.this, "User denied access to camera ", toast.length_long).show(); } }, Manifest.permission.CAMERA); }Copy the code

Github.com/dfqin/Permi…