Search code examples
androidandroid-imageandroid-bitmap

cookies with getBitmapFromURL()


I am passing the url to get the images from the server e.g.

getBitmapFromURL("http://abc.xyz.in/logo.jpg");

But it is not returning anything. Saying that images are private. So my question is that is there anyway to pass the cookie to getBitmapFromURL() method. So that i can get the images. Or any other alternative is there? Thanks a lot.


Solution

  • I got my answer. I can do this by using following line:

    connection.addRequestProperty("key", value);