Using UIL version 1.8.0 to load a twitter profile image url: http://api.twitter.com/1/users/profile_image/smashingmag.jpg?size=bigger
with disc and memory cache. The images are failing to load and storing the html that comes along with the 302 redirect in the disc cache file. The images never load or decode successfully (the onLoadingFailed method of my SimpleImageLoadingListener gets called for every twitter profile image url). Can anyone load a simple twitter image url with UIL?
Here is the content of my cache file for that url:
cat /mnt/sdcard/MyCache/CacheDir/1183818163
<html><body>You are being <a href="https://si0.twimg.com/profile_images/3056708597/6438618743e2b2d7d663fd43412bdae8_bigger.png">redirected</a>.</body></html>
Here is my configuration:
File cacheDir = StorageUtils.getOwnCacheDirectory(FrequencyApplication.getContext(), "MyCache/CacheDir");
DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
.cacheInMemory()
.cacheOnDisc()
.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
.build();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(FrequencyApplication.getContext())
.memoryCacheExtraOptions(480, 800)
.threadPoolSize(20)
.threadPriority(Thread.MIN_PRIORITY)
.offOutOfMemoryHandling()
.memoryCache(new UsingFreqLimitedMemoryCache(2 * 1024 * 1024))
.discCache(new TotalSizeLimitedDiscCache(cacheDir, 30 * 1024 * 1024))
.discCacheFileNameGenerator(new HashCodeFileNameGenerator())
.imageDownloader(new BaseImageDownloader(MyApplication.getContext(), 20 * 1000, 30 * 1000))
.tasksProcessingOrder(QueueProcessingType.FIFO)
.defaultDisplayImageOptions(defaultOptions)
.build();
ImageLoader.getInstance().init(config);