Flutter: Is it possible to save image to gallery without using requestLegacyExternalStorage or MANAGE_EXTERNAL_STORAGE permission?

Viewed 585

Google started sending the following message to developers, that means we won't be able to use requestLegacyExternalStorage flag soon, because targeting Android 11 will be soon a requirement and even the alternative permission MANAGE_EXTERNAL_STORAGE will require good reason to get approval. Not sure if saving image to Gallery is good enough reason for Google to allow it.

Is that absolutely necessary to request this permission to save an image to gallery, or we can get rid of it? In seems that the most popular packages gallery_saver and image_gallery_saver both require it.

Message from Google:

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.

1 Answers
Related