I'm still unable to get this to work even using the simplest b4A example listed below. I've tried calling this in a separate activity "GetData" and attempted to use CallSubDelayed but it never calls the JobDone event. Please let me know what I'm doing wrong. my Log shows this:
Activity (main) Pause, UserClosed = false **
** Activity (getdata) Create, isFirst = true **
sending message to waiting queue of uninitialized activity (submitjob)
** Activity (getdata) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Activity (getdata) Pause, UserClosed = true **
** Activity (main) Resume **
Sub Activity_Create(FirstTime AsBoolean)
Dim b4a As String
b4a = "
http://www.b4x.com"
Dim job1 As HttpJob
job1.Initialize("Job1", Me)
job1.Download(b4a)
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Dim s As String
s=Job.GetString
Log(s)
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub