I’ve written a phonegap App which gets its data from a JSON file which provides text to display and paths Amazon S3 hosted images, because the App is used in areas without signal a lot of the time it has to be able to download and Cache all content.
Is there a more elegant way to download packages of images than requesting every image individually and then saving it? Ideally I’d like to download a single package (e.g. a zip file) and then extract it to the phones file system after download as doing it image by image means a lot of individual HTTP requests which introduces substantial delays.
Well you would use the FileTransfer class to download the .zip to your sdcard then you’d have to write a plugin to do the unzip. Luckily Android includes the java.util.zip package so you wouldn’t have to import any additional libraries in order to do an unzip.