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

PermissionX.isGranted(mContext, it) 是不是没法用来判断特殊权限是否已经申请到?比如MANAGE_EXTERNAL_STORAGE #252

Open
jamgudev opened this issue Jun 23, 2023 · 1 comment

Comments

@jamgudev
Copy link

版本如下:implementation 'com.guolindev.permissionx:permissionx:1.7.1'
我想用 PermissionX.isGranted(mContext, it) 判断特殊权限是否已经申请,但一直返回false,实际上该特殊权限我已经申请过了。
我看内部实现也是直接调用的:
ContextCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED;

想问下郭神有想法适配一下特殊权限是否已经申请到的判断吗?拓展一下PermissionX.isGranted()的用法?

@pengguanming
Copy link

Environment.isExternalStorageManager()来检测是否可以拥有MANAGE_EXTERNAL_STORAGE,请参考https://ourcodeworld.com/articles/read/1559/how-does-manage-external-storage-permission-work-in-android

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