For a hybrid project I have a very simple requirement:
- download zip file,
- unzip it,
- serve content on a page from artifacts (html text, images).
This example uses plain Cordova 3.4+, with the command-line commands.
- cordova create Cordova-TransferUnzipPresent com.svdoever.tranferunzippresent TransferUnzipPresent
- cd Cordova-TransferUnzipPresent
- cordova platform add android
- cordova plugin add org.apache.cordova.file
- cordova plugin add org.apache.cordova.file-transfer
- cordova plugin add org.chromium.zip
- Replace code in www\index.html with the code below
- cordova emulate android
Works with iOS platform as well. The zip plugin does not work on wp8 (yet).
See also this blogpost.