Android Question Problem with WaitFor - Object context is paused (HttpJob)

FabioC6

Member
Licensed User
Hello,
I'm trying to interrogate a webservice using HttpJob with the code below, but it keeps displaying this message "Object context is paused. Ignoring CallSubDelayed: JobDone".
I have another function in this class which does basically the same thing and it works fine.
What am I missing?

Thanks.


B4X:
Sub GetMenu(Component As Object)
    Dim job1 As HttpJob
    job1.Initialize("Job1", Me)
 
    job1.Download(Address)
    job1.GetRequest.SetHeader("Authorization","Basic " & GetHash)
 
    Wait for JobDone (Job As HttpJob)
    Try
        If Job.Success Then
            CallSub2(Component,"SetMenu",Job.GetString)
        End If
    Catch
        Log(LastException)
    End Try
End Sub
 

FabioC6

Member
Licensed User
Ahh got it, so that was because the activity that has initialized the class was paused?

Thank you Erel, that did the trick.
 
Upvote 0
Top