MANAGE_EXTERNAL_STORAGE permission
4,131
If your app targets Android 10 (API level 29) or lower, you can temporarily opt out of scoped storage in your production app. If you target Android 10, however, you need to set the value of requestLegacyExternalStorage
to true in your app's manifest file:
<manifest ... >
<!-- This attribute is "false" by default on apps targeting
Android 10. -->
<application android:requestLegacyExternalStorage="true" ... >
...
</application>
</manifest>
Author by
Nitneuq
Updated on December 29, 2022Comments
-
Nitneuq over 1 year
playstore send me this news
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.
I don't understand what I need to do...
I use a plugin to allow user to display picture from his gallery. MANAGE_EXTERNAL_STORAGE permission is display first time user launch the plugin.
How can I be sure that my app will not be remove the 5th May
Edit: here is manifest of the only package who need permission for eternet storage, I don't found RequestLegacyExternalStorage
<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>
thank you
-
ADM about 3 years
-
Nitneuq about 3 yearsif I understand I onyl need to add <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/> to my manifest ? It's not realy clear for me ( bad english) and I just want to be sure to not have my app remove
-
blackapps about 3 yearsYou do not need MANAGE EXTERNAL STORAGE to display pictures from galery.
-
Nitneuq about 3 yearsI don"t understand what I really need to do T_T
-
Yegorf about 3 years@blackapps, should i add it if i want to write and read text file (logs)?
-
blackapps about 3 yearsNo. Not needed for your own files.
-
Nitneuq about 3 years@blackapps I need to do nothing without risks to be remove ?
-
Yegorf about 3 years@blackapps, i dont understand it too :D Why it is my own files? (yes, i created it), but how the system will remember it? What if i want to access any text file from the file provider (I can attach some files to the logs) - I need this permission. I have read all documentation, but I'm not sure about it.
-
blackapps about 3 yearsYou standard have not access to other apps files on Android 11 unless they are media files. And i have no idea what you mean with:
i want to access any text file from the file provider
-
Yegorf about 3 years@blackapps, user downloads file from browser. I want to get this file from Downloads and send it on the backend - that's what i mean.
-
blackapps about 3 yearsThe browser is a different app so your app cannot touch the downloaded file.
-
blackapps about 3 yearsWell not in the classic way. But the user can pick the file with ACTION_OPEN_DOCUMENT.
-
Nitneuq about 3 yearsI'm still lost on what to do, if someone can help me T_T
-
-
yozhik almost 3 yearsIt's partly true, because if you'll target Api level 30, that requestLegacyExternalStorage will not work anymore and you need to implement solution with SAF or MediaStore
-
Owais Yosuf about 2 yearsThis will work for Android 10 only. What about Android 11.