Closed hamza0786 closed 2 months ago
i am calling a function like this:
if (downloadModel.status == Status.SUCCESS){ myfunction() } if (downloadModel.status == Status.FAILED){ myfunction() }
the function is only calling when download is failed but not working when the download is success.
Could you tell the steps to reproduce? Pls note if you are using observeDownloads, list will get called every time db is update. In case you want to do anything specific but only one time on success, either user observeDowloadById or maintain some variable to make sure it get called only once.
Also Pls update to latest version 2.0.1, minor bugs are fixed
i just want to know how can i trace the download when they finished so that i can do something when download is success?
You can check with downloaModel.status
For single download use observeDownloadById, and when status is Success, perform some action.
In case you are using observeDownloads, you have to keep a track for each id, when download status come from non success to success state perform some action otherwise not
can you give example code how can i observe with download id?
Please check readme file
ok thanks anyway!
Hi! how can i call a custom function when currently running download is finished.basically i want to know how can i track the downloads running and do something when the download is completed?