android - Phonegap: new FileTransfer(); returns undefined -
i want download file in phonegap using filetransfer, "referenceerror: filetransfer not defined" error (line 3 on below code). using phonegap 3.3.0; file , filetransfer plugins added config.xml(and showing on build.phonegap.com). building via web interface
function descargarepo2(id) { try { var filedownloadedit = new filetransfer(); alert("hecho: " + filedownloadedit); } catch (e) { alert("el error de filetransfer es: " + e); } var uri = encodeuri("http://dl.dropbox.com/u/97184921/editme.txt"); var filepath = "www/data/"; filedownloadedit.download( uri, filepath, function(entry) { console.log("download complete: " + entry.fullpath); alert("file downloaded. click 'read editable downloaded file' see text"); }, function(error) { //alert("download error source " + error.source); //alert("download error target " + error.target); alert("error code" + error.code); }); }
Comments
Post a Comment