ethan123
ethan123

Reputation: 1084

How can I get image from URI returned from Android photos app?

I was using this question as a reference for how to get the image from a URI with an embedded URL, which was being returned from the Photos app starting a while back. Now, I've noticed that these URIs no longer contain this URL and rather contain some kind of key. I don't know what to do to get this image now. The URI I'm getting back looks like this:

content://com.google.android.apps.photos.contentprovider/0/1/mediaKey:/*long-key*/ACTUAL

How are we meant to use this to display a bitmap that a user selected from the Photos app?

Upvotes: 1

Views: 1649

Answers (1)

Read from the URI using

getContentResolver().openInputStream(uri)

Upvotes: 2

Related Questions