I am stumped on how HttpUtils handles multiple bitmap downloads. Here is a sample snippet:
where ImageBmp is a 10-element array of bitmaps.
In practice, all 10 of the "ImageJob.Download" commands will execute before the JobDone is raised (or are they?). So does JobDone have some sort of download "que" whereby all 10 downlaods are performed and then JobDone is raised and all 10 downloads are assigned to ImageBmp(x) in the correct order? Or maybe I am just complete off. I'm trying to acheive an end result where 10 different bitmaps can be downloaded from 10 different URLs, then each of those bitmaps can be assigned to the ImageBmp array in the proper order.
B4X:
Sub GetImages
For indexCnt = 0 To 9
Dim ImageJob As HttpJob
ImageJob.Initialize("SmImageJob", Me)
ImageJob.Download("http://somelocation/distribution/media/bitmap" & indexCnt & ".jpg")
Next
End Sub
Sub JobDone (Job As HttpJob)
If Job.Success = True Then
ImageBmp(x) = Job.GetBitmap
End If
End Sub
where ImageBmp is a 10-element array of bitmaps.
In practice, all 10 of the "ImageJob.Download" commands will execute before the JobDone is raised (or are they?). So does JobDone have some sort of download "que" whereby all 10 downlaods are performed and then JobDone is raised and all 10 downloads are assigned to ImageBmp(x) in the correct order? Or maybe I am just complete off. I'm trying to acheive an end result where 10 different bitmaps can be downloaded from 10 different URLs, then each of those bitmaps can be assigned to the ImageBmp array in the proper order.