i want to download a file and run it on android. but nothing happens when i use File Transfer download in --prod mode. even no errors!
constructor(public transfer: FileTransfer, private file: File, ...){}
download(){
const fileTransfer: FileTransferObject = this.transfer.create();
this.platform.ready().then(() => {
console.log('trying to update the application. . .');
let url = 'some url';
fileTransfer.download(url, this.file.externalDataDirectory + '/AzManCheKhabar.apk').then((entry) => {
console.log('download complete: ' + entry.toURL());
}, (error) => {
// handle error
console.log('download error: ' + error);
});
}