guolindev / PermissionX

An open source Android library that makes handling runtime permissions extremely easy.
Apache License 2.0
3.53k stars 406 forks source link

鸿蒙2.0系统权限拒绝一次之后不再重新发起申请 #190

Closed henkun614 closed 2 years ago

henkun614 commented 2 years ago

PermissionX.init(this).permissions(permissions) .request { allGranted, grantedList, deniedList -> if (allGranted) { showDialog() } else { toast("您拒绝了以下权限 $deniedList 可能会对您的正常使用造成影响") } } 拒绝一次之后allGranted就一直都是false

guolindev commented 2 years ago

你可以设置上onExplainRequestReason和onForwardToSettings的回调来引导用户开启权限,详细用户请参考主页文档 https://github.com/guolindev/PermissionX