THIS PROJECT IS DISCONTINUED — USE AT YOUR OWN RISK
Many Android applications need to download stuff off of the
Internet, particularly Web assets like feeds and images. This
module contains a lightweight cache implementation, in the
form of an abstract class (
AsyncCache) and one concrete
As the name suggests,
AsyncCache is designed for the case where
what you want might not already be available, either in RAM
(held in a
SoftReferences) or on disk (in a cache
directory of your choosing). In that case, you get handed
back some stub object (e.g., a placeholder image), while the
cache busily downloads what you need in the background.
Courtesy of integration with the CWAC Bus module, you
can be notified when the background download is complete, so
you can take appropriate action (e.g., replace the thumbnail).
WebImageCache is simply an
AsyncCache that knows how to download
and cache images off the Web.
Full instructions for using this module are forthcoming. Stay tuned!
This project requires the CWAC Task module and the
CWAC Bus module. A copy of
compatible JARs can be found in the
libs/ directory of
the project, though you are welcome to try newer ones, or
ones that you have patched yourself.
This is version 0.1 of this module, meaning it is pretty darn new.
Note that this module is undergoing some serious refactoring, and so it is likely to massively change over the next month or so.
com.commonsware.cwac.cache.demo package you will find
a sample activity that demonstrates the use of
Note that when you build the JAR via
ant jar, the sample
activity is not included, nor any resources -- only the
compiled classes for the actual library are put into the JAR.
The code in this project is licensed under the Apache Software License 2.0, per the terms of the included LICENSE file.
THIS PROJECT IS UNSUPPORTED