javagalleryandroid-permissionscropscoped-storage

Is it still possible to pick, crop and save an image from Gallery after Android 11?


everyone.

It is well known what a big blow Google inflicted on devs by making "Scoped storage" mandatory. After my app update got rejected by Google Play Console team for using a "sensitive permission" which my app is not eligable for (according to google), I have been struggling to make the necessary code changes and preserve my app functionallity to it's best, without removing any of it's functionallity.

My question is: Is it still possible to pick an image from the gallery, crop it (with pick and crop intents) and save it to a file, without using the "MANAGE_EXTERNAL_STORAGE" permission and how?

For reference, please take a look at an old question I posted a few years back. Does anyone know of a working method after Android 11 without the external storage manager permission or do I have to disable this function for newer versions?

I have already tried quite a few things with no success. There is also not much information online for this type of operation yet.


Solution

  • Have the same problem, but i dont need to crop images (but as i see - it will work with that after you get uri). The best way to work with images (if you need just images or video) since Android 11 - is Photo Picker (https://developer.android.com/training/data-storage/shared/photopicker#handle_the_photo_picker_results) It doesnt need any kind of permissions.