I’m making a specific kind of photo editor designed to redact stuff out of photos. Due to its very nature, it makes a lot of sense from a UX perspective to edit the photo in-place rather than save a copy that the user needs to be aware of (they could mistakenly send the non-redacted original photo to somebody, as they likely wouldn’t see that it wasn’t edited, from the thumbnail alone). Also, not all gallery apps index external app folders by default, so the edited image might not even appear.
In return, my photo editor would:
- provide a way to actually save a copy if that’s what the user asks for
- keep backups of the originals in its private app storage and have a feature to easily restore them in case the user made a mistake (a bit like Google Photo allows you to restore cropped photos, although in this case, the cropping information may actually be embedded in a non-destructive way in the photo itself)
I’ve been experimenting with Android’s PickVisualMediaRequest
native picker but it doesn’t provide write access. I also tried creating an Intent.ACTION_EDIT
filter for images on my activity (which can e.g. be launched through Google Photos), and it doesn’t seem like the provided URI is writable either as it goes through Google Photos’ content provider.
Which file-picking methods available on modern Android versions would solve my problem? Note that I don’t need nor want full external storage access, I’m fine with the user having to pick a file using an system picker that handles all the permission stuff, but I need write access. My app would be a pain to use if users had to manually delete original files the 90% of times where they don’t specifically ask to keep it. Google Photos is able to make destructive changes to gallery images, for instance.