I have discovered how to get an InputStream object from a Uri pointing
to an image stored on the SD card!!!
Since the method to do this was not straight forward to me, I would
like to share it so that others may not suffer like I did.

A ContentResolver is the thing needed, but it is an abstract class.
The "trick" it would seem, is to call getContentResolver() from your
activity or service like this:

    Uri imgUri = "content://media/external/images/media/92";
    InputStream in = getContentResolver().openInputStream(imgUri);

I hope that helps someone.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to