Nirmals502 / android-query

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

Download images in batch to warmup disk cache. #170

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be great to have the ability to pre-download all the images we need in 
our application to the disk cache, in order to be able to use these images 
offline.

For example, something like :
aq.fetch(List<String> urls);

It would be an awesome feature for people like me who need to start an app with 
already prepopulated disk cache to be able to use aq.id(image).image(url) in 
offline mode.

Original issue reported on code.google.com by michael....@playadz.com on 9 Dec 2013 at 10:01

GoogleCodeExporter commented 8 years ago
My bad, after browsing the sources if found the cache(String url, long expire) 
method.

The problem is it uses the same executor as the async requests, hence if I need 
to download 900 images during the first launch, the rest of my application will 
not display any images until all are downloaded.

It would be great to have 2 different executors, one for  using with the cache 
method, and one for the rest. 

Original comment by michael....@playadz.com on 9 Dec 2013 at 4:48