简体   繁体   English

无需提示即可访问所有文件

[英]Access All Files WIthout Prompt

I'm targeting Android 11. Is there a way to give full access to an application programmatically without having to prompt the User with a dialog, the intent and ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION etc?我的目标是 Android 11。有没有办法以编程方式授予对应用程序的完全访问权限,而无需通过对话框、意图和 ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION 等提示用户?

And if not, I would just like to prompt the User one time, not having to prompt the User every time the app runs.如果没有,我只想提示用户一次,而不必每次应用程序运行时都提示用户。

When you use a permission in Android you have to ask the user to.当您在 Android 中使用权限时,您必须要求用户这样做。 Unless the user disable it, the permission still enabled for your app since the user accepted it.除非用户禁用它,否则自用户接受以来,该权限仍为您的应用启用。

You can see here how to ask for permissions : https://developer.android.com/training/permissions/requesting您可以在此处查看如何请求权限: https : //developer.android.com/training/permissions/requesting

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM