首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MANAGE_EXTERNAL_STORAGE权限

MANAGE_EXTERNAL_STORAGE权限
EN

Stack Overflow用户
提问于 2021-04-15 10:46:45
回答 1查看 5K关注 0票数 3

游戏商店给我发了这个消息

代码语言:javascript
复制
We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of 1 or more of your app bundles or APKs.

Developers with apps on devices running Android 11+ must use Scoped Storage to give users better access control over their device storage. To release your app on Android 11 or newer after May 5th, you must either:

Update your app to use more privacy friendly best practices, such as the Storage Access Framework or Media Store API
Update your app to declare the All files access (MANAGE_EXTERNAL_STORAGE) permission in the manifest file, and complete the All files access permission declaration in Play Console from May 5th
Remove the All files access permission from your app entirely.
For apps targeting Android 11, the requestLegacyExternalStorage flag will be ignored. You must use the All files access permission to retain broad access.

Apps requesting access to the All files access permission without a permitted use will be removed from Google Play, and you won't be able to publish updates.

我不明白我需要做什么..。

我使用一个插件,让用户从他的画廊显示图片。MANAGE_EXTERNAL_STORAGE权限是用户第一次启动插件时显示的。

我怎么能确定我的应用程序不会在5月5日被删除?

编辑:这里是唯一需要eternet存储许可的包的清单,我没有找到RequestLegacyExternalStorage

代码语言:javascript
复制
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="io.flutter.plugins.imagepicker">
   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application>
        <provider
            android:name="io.flutter.plugins.imagepicker.ImagePickerFileProvider"
            android:authorities="${applicationId}.flutter.image_provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/flutter_image_picker_file_paths"/>
        </provider>
    </application>
</manifest>

谢谢

EN

回答 1

Stack Overflow用户

发布于 2021-04-25 12:39:24

如果您的应用程序的目标是Android 10 (API 29)或更低,您可以暂时选择退出生产应用程序中的作用域存储。但是,如果您的目标是Android 10,则需要在应用程序的清单文件中将的值设置为true:

代码语言:javascript
复制
<manifest ... >
  <!-- This attribute is "false" by default on apps targeting
       Android 10. -->
  <application android:requestLegacyExternalStorage="true" ... >
    ...
  </application>
</manifest>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67107041

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档