As described in this tutorial , especially in the example :
How to track 'wait for' until 'success' translate into progressbar?
B4X:
Sub Activity_Create(FirstTime As Boolean)
DownloadMany(Array("http://www.google.com", "http://duckduckgo.com", "http://bing.com"))
End Sub
Sub DownloadMany (links As List)
For Each link As String In links
Dim j As HttpJob
j.Initialize("", Me) 'name is empty as it is no longer needed
j.Download(link)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log("Current link: " & link)
Log(j.GetString)
End If
j.Release
Next
End Sub
How to track 'wait for' until 'success' translate into progressbar?