I have successfully downloaded a file to my Android phone using Phonegap\'s File API. I would like to download the file to the Downloads folder on my phone. For example, if
I had the same problem, but I solved it like this:
//if IOS cordova.file.documentsDirectory
window.resolveLocalFileSystemURL(cordova.file.externalDataDirectory, function (fileEntry) {
var filepath = fileEntry.toURL() + filename;
var fileTransfer = new FileTransfer();
console.log('FilePath ' + filepath);
fileTransfer.download(uri, filepath,
function (fileEntry) {
console.log("download complete: " + fileEntry.toURL());
},
function (error) {
console.log("ErrorDownload: " + JSON.stringify(error));
},
true,
{}
);
});