Android Question Why my Jobdone sub is never reach?

JCO

Active Member
Licensed User
Longtime User
Hello,

I have a pretty similar problem.
I'm updating an older program, where I did some validation on the server on the activity_create of the Main Activity, where it was working fine
Now, I moved it to the Starter Module, using the new Resumable features, and the JobDone never returns.

The code I'm using:
B4X:
Public Sub SendCredentials()
    Dim j As HttpJob
    Dim fullURL As String
    Dim fullParams As String
    
    Log("Sending credentials to server")
    
    fullURL = okg.ServerBaseUrl & okg.SyncUrlFile
    fullParams = "q=" & QueryNumber
    fullParams = fullParams & "&k=" & okg.validationKey
    fullParams = fullParams & okg.Authentication
    
    j.Initialize("", Me)
    j.PostString(fullURL, fullParams)
    Log("Credentials check query sent")
    Wait For (j) JobDone(j As HttpJob)
'*** Never executes ***
    If j.Success Then
        Dim resp As String = J.GetString
        j.Release
        Authenticate(resp)
    Else
        Authenticate("{""login_status"":-1}")
    End If
    
End Sub

Sometime after the PostString call, I get this message on the Log:
sending message to waiting queue of uninitialized activity (submitjob)
 
Upvote 0
Top