cordova - Unable to download pdf using phonegap app -
i have created 1 app. in want feature download pdf
- my app redirects following url when
http://www.premah.com.au/monthly-updates/
now, when redirect app mobile's browser.i can download pdf when click on of pdf's poster. when using phonegap build this.unable download pdf have tried following : 1. inappbrowser using window.open _blank,_system. 2. have tried using file-transfer plugin downloading absolute url of server ex:
http://www.premah.com.au/wp-content/uploads/2013/04/apr-2014-gen-f.pdf
if have 100% working solution inappbrowser or file-transfer plugin please put code.
many in advance.
source = http://www.premah.com.au/wp-content/uploads/2013/04/apr-2014-gen-f.pdf
fpath = your_file_path; //use filesystem file path.
downloadbook: function(source, fpath) { var filetransfer = new filetransfer(); filetransfer.download(source,fpath,function(entry) { }, function(error) { console.log("download error target " + error.code); }); }
Comments
Post a Comment