Can't edit image in Google Photos after “Upload to Photos” activity

南笙酒味 提交于 2019-12-13 02:27:48

问题


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.

来源:https://stackoverflow.com/questions/53976693/cant-edit-image-in-google-photos-after-upload-to-photos-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!