f5b6f2b2bbe713581ab0cb4086aee6be34c63c1f
[wl-mobile.git] / assets / www / js / downloader.js
1 function Downloader() {
2  
3 }
4  
5 Downloader.prototype.downloadFile = function(fileUrl,dirName,fileName,overwrite,win,fail) {
6  if(overwrite==false) overwrite="false";
7  else overwrite="true";
8  PhoneGap.exec(win, fail, "Downloader", "downloadFile", [fileUrl,dirName,fileName,overwrite]);
9  
10 };
11  
12 PhoneGap.addConstructor(function() {
13  PhoneGap.addPlugin("downloader", new Downloader());
14  PluginManager.addService("Downloader","pl.org.nowoczesnapolska.wlmobi.Downloader");
15 });