Skip to content
New issue

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

scope.showRequestReasonDialog弹窗没展示 #260

Open
nangongkuo opened this issue Sep 12, 2023 · 1 comment
Open

scope.showRequestReasonDialog弹窗没展示 #260

nangongkuo opened this issue Sep 12, 2023 · 1 comment

Comments

@nangongkuo
Copy link

PermissionX.init(activity)
.permissions(PermissionX.permission.POST_NOTIFICATIONS)
.onExplainRequestReason { scope, deniedList ->
val message = "PermissionX需要您同意以下权限才能正常使用"
scope.showRequestReasonDialog(deniedList, message, "Allow", "Deny")
}
.request { allGranted, grantedList, deniedList ->
if (allGranted) {
Toast.makeText(activity, "所有申请的权限都已通过", Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(activity, "您拒绝了如下权限:$deniedList", Toast.LENGTH_SHORT).show()
}
}

val message = "PermissionX需要您同意以下权限才能正常使用"
scope.showRequestReasonDialog(deniedList, message, "Allow", "Deny")
弹窗没有展示,直接展示了系统的权限申请弹窗,这是为什么?我是按照你文档里说的用的

@guairongyi
Copy link

我也遇到这个问题了,你解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants