Hello,
I would like to stay on the "init" screen as long as the download is not complete and then display the "end" screen. With this code, there is no waiting. Thanks for your help.
I would like to stay on the "init" screen as long as the download is not complete and then display the "end" screen. With this code, there is no waiting. Thanks for your help.
B4X:
Activity.LoadLayout("init")
Dim job As HttpJob
job.Initialize("j", Me)
job.Download("https://test/test.txt")
Wait For (job) JobDone(j As HttpJob)
If j.Success Then
Activity.LoadLayout("end")
Else
Activity.LoadLayout("error")
End If
j.Release