We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PermissionX.init(this).permissions(requestList).onExplainRequestReason(new ExplainReasonCallback() { @OverRide public void onExplainReason(@nonnull ExplainScope scope, @nonnull List deniedList) { LogUtil.w("userinfo", "----- 申请权限"); scope.showRequestReasonDialog(deniedList, "需要同意以下权限才可以使用", "同意", "拒绝"); } }).request(new RequestCallback() { @OverRide public void onResult(boolean allGranted, @nonnull List grantedList, @nonnull List deniedList) { if (allGranted) { // openAblum(); } } });
上面的代码,showRequestReasonDialog 弹窗不执行,然后直接就弹窗系统的申请权限了,请问怎么弄呢? 华为mate40 pro手机,鸿蒙系统
The text was updated successfully, but these errors were encountered:
这个是首次拒绝以后才显示的。想要先显示后申请,可以使用.explainReasonBeforeRequest()方法,readme里有
Sorry, something went wrong.
No branches or pull requests
PermissionX.init(this).permissions(requestList).onExplainRequestReason(new ExplainReasonCallback() {
@OverRide
public void onExplainReason(@nonnull ExplainScope scope, @nonnull List deniedList) {
LogUtil.w("userinfo", "----- 申请权限");
scope.showRequestReasonDialog(deniedList, "需要同意以下权限才可以使用", "同意", "拒绝");
}
}).request(new RequestCallback() {
@OverRide
public void onResult(boolean allGranted, @nonnull List grantedList, @nonnull List deniedList) {
if (allGranted) {
// openAblum();
}
}
});
上面的代码,showRequestReasonDialog 弹窗不执行,然后直接就弹窗系统的申请权限了,请问怎么弄呢? 华为mate40 pro手机,鸿蒙系统
The text was updated successfully, but these errors were encountered: