Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Android Downloader Cordova plugin
========
This plugin is designed to support downloading files using Android DownloadManager.
Installation
--------
```bash
cordova plugin add integrator-cordova-plugin-downloader
```
Usage
--------
```javascript
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>)