【发布时间】:2021-02-13 12:05:42
【问题描述】:
我希望我的 Flutter 应用程序能够对整个外部存储(特别是 /sdcard/Android)进行写访问,并且我找到了 ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION 的文档,这似乎正是我所需要的,因为它还授予访问权限在应用程序数据和 obb 文件夹之外。 不幸的是,这个动作刚刚在 API 级别 30 中实现,对我来说还不能使用。 我知道
<application
android:requestLegacyExternalStorage="true"
不幸的是,这也让我可以访问应用程序文件夹。 他们在文档中写道,防病毒软件使用此权限级别。 在 API 29 中必须有一种归档方式。 我很感激任何提示!
【问题讨论】:
-
您确实意识到
MANAGE_EXTERNAL_STORAGE权限can't currently be used in the Google Play Store。在不知道为什么要“完全访问”的情况下,您应该阅读 Commonware 在 Internal、External 和 Removable 存储上的帖子。 -
android:requestLegacyExternalStorage="true"
unfortunately also just gives me access to the apps folder.否。Android 10 设备上的该标志可以访问整个外部存储。此外,您没有提及所用设备的 Android 版本。 -
您在帖子主题中提到的内容不会出现在帖子本身中。不好。
标签: android flutter android-permissions android-external-storage android-api-levels