【问题标题】:alternative to MANAGE_EXTERNAL_STORAGE for Android 10Android 10 的 MANAGE_EXTERNAL_STORAGE 的替代品
【发布时间】: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 在 InternalExternalRemovable 存储上的帖子。
  • 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


【解决方案1】:

ext_storage plugin 授予对 Android 上 app 文件夹之外的文件夹的访问权限。无需修改 Android 应用的清单。

【讨论】:

    猜你喜欢
    • 2023-01-21
    • 1970-01-01
    • 1970-01-01
    • 2012-09-12
    • 2015-08-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-17
    相关资源
    最近更新 更多