This is the function i tried.
downloadFile(){
const fileTransfer = new FileTransfer();
const uri = encodeURI(‘yourdomain.com is available for purchase - Sedo.com’);
const filePath = cordova.file.dataDirectory + ‘file.apk’;
fileTransfer.download(
uri,
filePath,
function(entry) {
console.log('Download complete: ' + entry.toURL());
},
function(error) {
console.log('Download error: ' + error.source);
}
);
}
And it return RefereceError: FileTransfer() is not defined.