Hi,

I am trying to depict on the screen the image I receive from my
neighbour via a text message. I mean, the other node sends me a
message where an image is encode (I can read the PNG header, ...) and
now I want to show it on the screen, but it doesn't appear nothing. I
must be doing something wrong ¬¬.

Here is my code:

ImageView img = (ImageView)
this.findViewById(R.id.DTNApps_DTNReceive_ImageView);

byte[] bytes = input.getBytes("US-ASCII");
InputStream in = new BufferedInputStream(new
ByteArrayInputStream(bytes));

Drawable drw = Drawable.createFromStream(in, "src");
img.setImageDrawable(drw);


As I said, nothing appears on the screen. The img hsa a correct value
since I try
"img.setImageDrawable(getResources().getDrawable(R.drawable.sample_0));"
and shows the picture.

Can anyone help me??


Bye and thanks for your time.

-- 
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