On Mon, Oct 11, 2010 at 12:31 PM, venkata raidu <[email protected]> wrote:
>   I am trying to convert a picture stored on the phone to a byte
> array.
>   I retrieved the Uri of the picture which is in the form "content://
> media/external/images/media/41"
>   Once I get the URI of the file, I can pass it to a file constructor
> and retrieve bytes.
>
>  So, can anyone advise how to do this?

Not that way.

Use ContentResolver and openInputStream() to get an InputStream on the
data represented by the Uri.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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

Reply via email to