My app needs to download a few images from the web and I've been using Volley for the other basic requests for a couple of months now. However, when I try to get image from the web on Android 2.2, this error comes up. I've only tested on Android 4.3 and android 2.2 and it works perfectly on 4.3.
E/Volley(2603): [65] BasicNetwork.performRequest: Unexpected response code 302 for <request URL>
Here's my code :
imageContainer = imageLoader.get(imageUrl, new ImageListener() {
public void onErrorResponse(VolleyError error) {
iv.setImageResource(0);
}
public void onResponse(ImageContainer response, boolean arg1){
bitmap = response.getBitmap();
if (bitmap != null) {
iv.startAnimation(AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in));
iv.setImageBitmap(bitmap);
}
}
});
Doesn't Volley handle redirects on it's own? Any ideas on what could be done here?
Thanks!