Answers for "ionic download"

0

ionic download

import { Downloader } from '@ionic-native/downloader/ngx';


constructor(private downloader: Downloader) { }

...

   var request: DownloadRequest = {
          uri: YOUR_URI,
          title: 'MyDownload',
          description: '',
          mimeType: '',
          visibleInDownloadsUi: true,
          notificationVisibility: NotificationVisibility.VisibleNotifyCompleted,
          destinationInExternalFilesDir: {
              dirType: 'Downloads',
              subPath: 'MyFile.apk'
          }
      };


  this.downloader.download(request)
              .then((location: string) => console.log('File downloaded at:'+location))
              .catch((error: any) => console.error(error));
Posted by: Guest on May-27-2020
0

ionic download

$ ionic cordova plugin add integrator-cordova-plugin-downloader
$ npm install --save @ionic-native/downloader@4
Posted by: Guest on July-12-2020
0

ionic download

Cannot find name 'DownloadRequest'.
Posted by: Guest on May-11-2021

Browse Popular Code Answers by Language