RockySteveJobs / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

Basic Auth for Image loading is not working #113

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to load image from a server protected by Basic auth
2.
3.

What is the expected output? What do you see instead?
I expect to see my image in the list view, but i see the fallback image
the server send a 401

What version of the product are you using? On what operating system?
0.24.3

Please provide any additional information below.
Code snippet :
AQuery aq = new AQuery(convertView);
BasicHandle handle = new BasicHandle("username", "passwd");
aq.auth(handle);
aq.id(R.id.img).image(url, true, true, 0, R.drawable.product_list_placeholder, 
null, AQuery.FADE_IN_NETWORK, AQuery.RATIO_PRESERVE);

FYI : If I remove basic auth from my server the images load correctly

Original issue reported on code.google.com by cedma...@gmail.com on 30 Dec 2012 at 4:10

GoogleCodeExporter commented 8 years ago
The snippet is within the ArrayAdapter getView method

Original comment by cedma...@gmail.com on 30 Dec 2012 at 4:12

GoogleCodeExporter commented 8 years ago
The .auth() method needs to follow .id(), not before it.

Original comment by tinyeeliu@gmail.com on 18 Apr 2013 at 4:40