HBiSoft / PickiT

An Android library that returns real paths from Uri's
MIT License
292 stars 54 forks source link

Error when picking from Google Photos that requires a download #7

Closed tomafc330 closed 4 years ago

tomafc330 commented 4 years ago

It looks like the library doesn't support the use case when the user selects a Google Photo that isn't on their phone (ie. backed up from archives).

This is the content uri: content://com.google.android.apps.photos.contentprovider/4/1/mediakey%3A%2Flocal%253Ae4e33dc7-fbde-4497-b771-d8099e6b1793/ORIGINAL/NONE/903022857

and Utils.getRealPathFromURI_API19(this, selectedImageUri) returns null

Picking from Google photos with an image that exists on the devices works as expected.

Any thoughts here?

HBiSoft commented 4 years ago

@tommytcchan Sorry for the late reply.

Can you please elaborate on what you said when the user selects a Google Photo that isn't on their phone (ie. backed up from archives).?

Can you please explain how I can reproduce this?

I can add an if statement checking if the uri contains mediakey:

HBiSoft commented 4 years ago

Closing this due to inactivity.

Alimittech commented 4 years ago

Hi bro. I when choose a file or image from google drive or google photos , app crash. file and photo have local URI and don't need to download.