I\'m trying to download multiple files one by one (file is downloaded, we start downloading the next file). Using this method I can keep track of the files being downloaded.
If I understand correctly, you do not want to download all the files at the same tim e(simultaneously) but one by one (serially).
In order to do so build a String array with the URLs to download, and call execute()
with that array.
Example: Assuming that your
DownloadFileAsync
expects String as a parameter to it'sdoInBackground method
, you would call to:
new DownloadFileAsync().execute(url1, url2, url3, url4, video1, video2, video3, video4);