integrator-cordova-plugin-downloader

1.1.0 • Public • Published

Android Downloader Cordova plugin

This plugin is designed to support downloading files using Android DownloadManager.

Installation

cordova plugin add integrator-cordova-plugin-downloader

Usage

 
var request = {
    uri: '',
    title: '',
    description: '',
    mimeType: '',
    visibleInDownloadsUi: true,
    notificationVisibility: 0,
          
    // Either of the next three properties
    destinationInExternalFilesDir: {
        dirType: '',
        subPath: ''
    },
    destinationInExternalPublicDir: {
        dirType: '',
        subPath: ''
    },
    destinationUri: '',
    headers: [{header: 'Authorization', value: 'Bearer iaksjfd89aklfdlkasdjf'}]
};
 
this.downloader.download(request)
        .then((location) => console.log('File download location:' + location))
   .catch((error) => console.error(error));

Credits and License

Based on Emil Bay's cordova-plugin-android-downloadmanager(https://github.com/emilbayes/cordova-plugin-android-downloadmanager)

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i integrator-cordova-plugin-downloader

      Weekly Downloads

      628

      Version

      1.1.0

      License

      ISC

      Unpacked Size

      10.9 kB

      Total Files

      6

      Last publish

      Collaborators

      • integrator