1

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?

Community
  • 1
  • 1
ethan123
  • 1,084
  • 2
  • 14
  • 26
  • You could use `BitmapFactory` to read in the stream, per yuku's suggestion. Or, most decent image-loading libraries for Android (Picasso, Universal Image Loader, etc.) will be able to handle this `Uri`. Those libraries will handle things like loading the image on a background thread for you, saving you the trouble. – CommonsWare Jul 05 '15 at 16:24

1 Answers1

2

Read from the URI using

getContentResolver().openInputStream(uri)
Randy Sugianto 'Yuku'
  • 71,383
  • 57
  • 178
  • 228