0

There is a URL, without an image extension, that wherever go to it in the browser it will download an image.

In fiddler, I can see the response like this

HTTP/1.1 200 OK
Server: nginx
Date: Sun, 21 Dec 2014 08:08:53 GMT
Content-Type: image/jpg
Transfer-Encoding: chunked
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Disposition: attachment; filename="current.jpg"

I want to be able to get that "current.jpg" image and add it to an imageview. I've tried with

BitmapFactory.decodeStream(url.openConnection().getInputStream());

But this will make my imageview blank.

Boldijar Paul
  • 5,405
  • 9
  • 46
  • 94
  • http://stackoverflow.com/questions/4509912/is-it-possible-to-use-bitmapfactory-decodefile-method-to-decode-a-image-from-htt – JASON G PETERSON Dec 21 '14 at 08:19
  • @JASONGPETERSON that question won't help me. The bitmap will always be null, because the bitmap is an attachment, my url does not end with .jpg or .png.. – Boldijar Paul Dec 21 '14 at 08:24

1 Answers1

0

You can use AQuery library to load images from network.

max59
  • 606
  • 1
  • 7
  • 16