Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229111

Downloading with File Transfer nothing happens

$
0
0

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);
                    });
}

Viewing all articles
Browse latest Browse all 229111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>