无法使用 flutter 中的权限处理程序访问 Android 12 中的存储
我正在尝试访问Android中的“/storage/emulation/0/下载”目录。我正在使用clermission_handler软件包请求此许可。我在androidmanifest.xml中添加了read_external_storage,write_external_storage。
问题在于,我能够在Android 11及更早版本中访问相同的路径,而不是在Android 12中访问。如果我们使用此权限,敏感商店可能会拒绝这一点。我想知道为什么同样的流程在Android 11中效果很好,而在Android 12中不行。
I'm trying to access the "/storage/emulated/0/Download" directory in Android. I'm using the permission_handler package to request this permission. I added READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE in AndroidManifest.xml.
The issue is that I am able to access the same path in Android 11 and earlier versions but not in Android 12. When I tried using MANAGE_EXTERNAL_DIRECTORIES in Android 12, it worked fine, but I don't want to use this permission as it is sensitive and the play store may reject this if we use this permission. I'm wondering why the same flow works fine in Android 11 but not in Android 12. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论