You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LiPermission.with(context)
.runtime()
.checkPermission(Permissions.WRITE_EXTERNAL_STORAGE)
.rationale(newRationaleListener() {
@OverridepublicvoidshowRationale(Contextcontext, List<String> permissions, RequestExecutorexecutor) {
// 授权合理说明// to do some things
}
})
.setCallback(newRequestCallback() {
@OverridepublicvoidonGranted(List<String> list) {
// 授权成功 ...// to do some things
}
@OverridepublicvoidonDenied(List<String> list) {
// 授权永久被禁止if (LiPermission.hasAlwaysDeniedPermission(context, list)) {
// 打开权限设置界面LiPermission.with(SplashActivity.this).launcher().start(100);
return;
}
// 授权失败 ...// to do some things
}
})
.start();