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)

Package Sidebar

Install

npm i integrator-cordova-plugin-downloader

Weekly Downloads

550

Version

1.1.0

License

ISC

Unpacked Size

10.9 kB

Total Files

6

Last publish

Collaborators

  • integrator