Search code examples
androidimageuniversal-image-loader

Universal Image Loader reuse images


Using Universal Image Loader, is it possible to directly save images to disk and reuse those images between different runs of the application?

I know imageLoader.displayImage(imageURI, itemHolder.image, options); gets images from the cache the second time, but if you exit the app the cache is removed.

I want the display image method to save the image to a permanent location and use that location every time the app calls that method.

Is this possible using Universal Image Loader or do I need to find another way?


Solution

  • Try to use

    .discCache(new FileCountLimitedDiscCache(cacheDir, new Md5FileNameGenerator(), 1000)) 
    

    option in ImageLoaderConfiguration

    It work for me.