Android Question Downloading more files using Service module

Roberto P.

Well-Known Member
Licensed User
Longtime User
as explained in the tutorial https://www.b4x.com/android/forum/threads/downloading-files-using-service-module.7572

I need to download many files from servers. If you launch the list (with for) the file to be downloaded, the server requests are made immediately and overlap the server response

You know how to give advice on how to start the download request only after the previous file has been downloaded?

In practice, the durations for loop, for each request, the cycle should stop and wait for the terms of the file download.

I hope it is clear.

Thanks in advance
Roberto
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
I did not use that DownloadService but I think it is better not to use for loop but declare a global index as int and start only yoururlslist.Get(index) and then at the FinishDownload you increase index value index=index+1 and process the next url yoururlslist.Get(index)
 
Upvote 0
Top