-1

I need help displaying this image which I'm pulling from a JSON server.

JSON Value returned:

          "photoThumbnailUrl": "http://media.xxx.co.uk/75k/74944/18863829
          /74944_OSI1000044_IMG_00_0000_max_200x138.jpg"

I just need to display this image in my application.How do I do this?

SomCollection
  • 481
  • 1
  • 7
  • 17

2 Answers2

0

Parse the JSON download the image to a local file using some asynctask here´s a sample Trying to use AsyncTask do download some image files then use a ImageView to reflect it: here's a link Show Image View from file path?


hope it helps

Community
  • 1
  • 1
Sergey Benner
  • 4,421
  • 2
  • 22
  • 29
0

Try this and let me know what happen..

URL newurl;
try
{
newurl = new URL("http://media.xxx.co.uk/75k/74944/18863829/74944_OSI1000044_IMG_00_0000_max_200x138.jpg");
bitmap = BitmapFactory.decodeStream(newurl.openConnection().getInputStream());
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
img.setImageBitmap(bitmap);
user370305
  • 108,599
  • 23
  • 164
  • 151
  • Thanks mate,it is partialy worked.I can parse the images as a json string.but what I need is to display the images when the response is recieved. – SomCollection Feb 16 '12 at 00:57