I'm loading a 95KB image, dimensions 1024x683 using Universal Image Loader. When I'm on wireless, the image loads just fine. However, if I turn off wireless and use the phone's network, it downloads the image at 305x203.
This is my config:
// setup the image async loader
DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
.cacheInMemory()
.cacheOnDisc()
.build();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
.defaultDisplayImageOptions(defaultOptions)
.build();
ImageLoader.getInstance().init(config);
This is the download:
ImageLoader.getInstance().displayImage(imageUrl, imageView, new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
super.onLoadingComplete(imageUri, view, loadedImage);
android.util.Log.v("image size", String.valueOf(loadedImage.getWidth())+" x "+String.valueOf(loadedImage.getHeight()));
}
});
I've tried removing cacheInMemory. I've tried using loadImage and specifying a target size, but it still downloaded at the smaller size. I tried changing the image scale type, using NONE and EXACTLY, no change.
I feel like I'm missing something obvious, but I can't figure it out.