I have network image view which should get populated when I get the response back from the server in JSON format.
I get back a URL in json and I go to URL and show the image in my list view in android. However, this works fine if I use any image which is publicly hosted on internet.
In my case server is on IBM Domino and everything is in the domino database. The URL won't open unless i have user credentials to do so.
For general request responses using volley, I set a session ID in request headers, telling the domino server that i have authenticated myself already. however, in case of network Image view, I am unable to proceed as i do not know how to authenticate myself with the server.
The images do not show in the list view and I see following in my logcat
SkImageDecoder::Factory returned null
I tried to open the same URL in browser, it asks for my user ID password and if I login, I am able to download the jpg file on my system.
Is there a way to set my http request headers for network image view ? How shall I proceed in this case ? Please help
Thanks
NetworkImageView
usesImageLoader
which internally makes ImageRequests usingmakeImageRequest
ImageRequest extends from Request.
Request
class has agetHeaders()
method which allows to set request headers.So if you can override
makeImageRequest
method ofImageLoader
and then overridegetHeaders()
forImageRequest
inside it, you should be able to set your request headers forNetworkImageView