I've been using the following code to download one file from web server. The value of FileUrl is set with the appropriate file I am downloading. Is possible to send a list of files to download, or is necessary to do them individually, by changing the value of FileUrl for each file.
B4X:
Sub get_new_data
HttpUtils.CallbackActivity = "Main" 'Current activity name.
HttpUtils.CallbackJobDoneSub = "JobDone"
HttpUtils.Download("Job1", FileUrl)
End Sub
Sub JobDone (Job As String)
If HttpUtils.IsSuccess(FileUrl) Then
File.Copy2(HttpUtils.GetInputStream(FileUrl),File.OpenOutput(File.DirDefaultExternal,"filename",False))
End If
End Sub