My Android app ultimately has a selection of images stored locally, and then shares those using
final Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND_MULTIPLE);
shareIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUris);
shareIntent.setType("image/*");
context.startActivity(Intent.createChooser(shareIntent, "Share images to.."));
One option is to "Upload to Photos", which works perfectly.
However, when then viewing the image in Google Photos, editing the photo (eg. cropping) won't let me save the image, but on "Save a copy". Interestingly, the "Save a copy" action will create a copy in the folder to image originated from, and that copy is not visible in Google Photos. There, only the unedited image remains.
When using my PC instead of my phone, I can edit and save the photo without problems. Also, if I eventually delete the original image on my phone, I can then edit and save the image on Google Photos.
It appears that "Upload to Photos" has a sharing mechanism which keeps to image in Google Photos tied to the original, local source. Can anyone shed some light on the internals here and how to decouple the two images so I can edit and save the image on Google Photos?
Edit
Switching to Android 7.0+ compatible content URIs took a while, see Is there a way to get around size limit for "Upload to Photos". Having gotten that to work, I'm back at the original issue.