hello
I need some advice ...
I have read html pages every two minutes to extract the information.
Here I prepare the task ..
Here are executed.
Unfortunately, I often get timeout errors, which do not allow me to see if the task was completed (numJob <>0).
Is there a way to determine the end of the task? (some event)
I need some advice ...
I have read html pages every two minutes to extract the information.
Here I prepare the task ..
B4X:
Dim task As Int=0
Dim job(tabella.Size ) As HttpJob
For Each riga As st_tabella In tabella
job(task).Initialize (task,Me)
job(task).Download("http://www.miosito.com/" & riga.Nome)
job(task).GetRequest.timeout=4000
Log("inizialize job=" & task & " Nome :" & riga.Nome)
task=task+1
Next
numJob = task
Here are executed.
B4X:
Sub JobDone(job As HttpJob)
Dim st As JStringFunctions
If job.Success = True Then
Log("JobName = " & job.JobName & " JobSuccess = " & job.Success )
.
.
.
.
Else
Log("Error: " & job.ErrorMessage)
End If
numJob=numJob-1
If numJob =0 Then
Log("********* end all job **********")
.
.
.
.
End If
End Sub
Unfortunately, I often get timeout errors, which do not allow me to see if the task was completed (numJob <>0).
Is there a way to determine the end of the task? (some event)