Skip to content

DownloadTask.onProgressUpdate ​

js
    DownloadTask.onProgressUpdate(function callback)

Listens for the download progress change event.

Parameters

  • function callback: callback function for the download progress change event

Parameters of the callback function

  • Object res: returns the download progress change information

res properties:

PropertyTypeDescription
progressnumberDownload progress percentage
totalBytesWrittennumberLength of data already downloaded, in Bytes
totalBytesExpectedToWritenumberTotal length of data expected to be downloaded, in Bytes