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

申请 MANAGE_EXTERNAL_STORAGE 时,没有跳转直接返回失败 #279

Open
Tanuyoki opened this issue May 13, 2024 · 0 comments
Open

Comments

@Tanuyoki
Copy link

下面代码使用 MANAGE_EXTERNAL_STORAGE 并且不进行 showRequestReasonDialog 就能复现
这时不会跳转到设置页,直接返回 deniedList

  • 操作系统:MIUI 13
  • SDK版本:1.7.1
    private fun request() {
        val permissions = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
            listOf(Manifest.permission.MANAGE_EXTERNAL_STORAGE)
        } else {
            listOf(
                Manifest.permission.READ_EXTERNAL_STORAGE,
                Manifest.permission.READ_EXTERNAL_STORAGE)
        }
        PermissionX.init(this)
            .permissions(permissions)
            .onExplainRequestReason { scope, deniedList ->
//                val message = "PermissionX需要您同意以下权限才能正常使用"
//                scope.showRequestReasonDialog(deniedList, message, "Allow", "Deny")
            }
            .request { allGranted, grantedList, deniedList ->
                Toast.makeText(this, "granted list $grantedList, \ndenied list $deniedList", Toast.LENGTH_SHORT).show()
            }
    }
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

1 participant