mramonlopez / cordova-plugin-file-downloader

Phonegap plugin to download a list of files or a single file to the phone, check consistency and unzip if necessary (Android and ios)
MIT License
23 stars 19 forks source link

How can I get download percentage? #6

Open kid1412621 opened 5 years ago

kid1412621 commented 5 years ago

I've tried this :

document.addEventListener('DOWNLOADER_downloadProgress', function(event) {
        let data = event.data
        console.log('processing', data)
})

But I got nothing in console, could you give a demo?

Naseer-Ahmad commented 5 years ago

I've get it working by using this:

document.addEventListener('DOWNLOADER_downloadProgress', (event: any) => {
  let data = event.data;
  console.log(data);
})

also I've added all my event listeners in component constructor.

Nousheenk commented 5 years ago

@kid1412621 did you get the download progress even i am getting the same problem

kid1412621 commented 5 years ago

Sorry I forget. Our team drop off Cordova.

On Fri, Mar 29, 2019, 14:19 Nousheenk notifications@github.com wrote:

@kid1412621 https://github.com/kid1412621 did you get the download progress even i am getting the same problem

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mramonlopez/cordova-plugin-file-downloader/issues/6#issuecomment-477882429, or mute the thread https://github.com/notifications/unsubscribe-auth/AZD4phXh0-CMUSivZgTI1Xf26reg3i68ks5vbbBcgaJpZM4W72u0 .