vasani-arpit / cordova-plugin-downloadmanager

A Cordova plugin to download file in system's default download manager
44 stars 38 forks source link

Added addCompletedDownload method call for the case when the file has already been downloaded #2

Closed SlidEnergy closed 4 years ago

SlidEnergy commented 6 years ago

Hello. I added a method that calls the addCompletedDownload method on the DownloadManager object. https://developer.android.com/reference/android/app/DownloadManager.htm

I had a situation that I already downloaded the file via the web api as an arrayBuffer and processed the possible responses from the server. I needed only to save this file and call the notification via downloadManager. To save the file to the Downloads folder, I used cordova-plugin-file. And in order to just show the notification, I found that downloadManager has a special method.

vasani-arpit commented 6 years ago

Thanks for PR. 👍 I'll test it and merge.