I have got "No files supported by provider".
I just want to open file.
But in Android this is a impossible!

On Friday, 19 December 2008 09:16:25 UTC+2, PAS wrote:
>
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/21e68bf6-8872-47e3-b2ad-6b12c8c43ea0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to