Android Question Sub jobdone signature does not match expected signature.

droidman

Member
Licensed User
Longtime User
Hi there
100% stuck on this one, after a few hours i dicided to ask for help.

the job was working untill i decided that i needed a secondary job.
this makes 2 simple sql querys and gets a total of today and yesterday income.
so i think i need 2 jobs so i did this:

Global
Dim job1,job2 As HttpJob
and then:

B4X:
Sub ExecuteRemoteQuery(Query As String, JobName As String)
    job1.Initialize(JobName, Me)
    job1.PostString("http://xxxxx.net/xxxxx.php", Query)
    DateTime.TimeFormat = "yyyy-MM-dd"
    s = DateTime.Time(DateTime.Now)
    Yesterday = DateTime.add(DateTime.Now, 0, 0, -1)
    s = DateTime.Date(Yesterday)
    job2.Initialize(JobName, Me)
    job2.PostString("http://xxxxx.net/xxxxx.php", "SELECT SUM(t.Total) XXXXXXX as t;")
    Log("end of executeremotequery")
End Sub

B4X:
Sub JobDone(Job As HttpJob)
    ProgressDialogHide
    Dim res As String
    Dim res2 As String
    Dim parser As JSONParser
    If Job.Success = True Then
    Select Job.JobName
    Log(Job.JobName)
    Case "job1"
        Log(Job.JobName)
        res = Job.GetString
        Log("Response from server: " & res)
        parser.Initialize(res)
      
                    rv.SetText("Label2", res & "€")
                  
        Case "job2"
        Log(Job.JobName)
        res2 = Job.GetString
        Log("Response from server: " & res2)
        parser.Initialize(res2)
  
                    rv.SetText("Label3", res2 & "€")
    End Select
        'ToastMessageShow("Error: " & Job.ErrorMessage, True)
      
    End If
    job.Release

im a bit lazy so the sub ExecuteRemoteQuery gets the query and then i set the query manually below so that i have both jobs initialized there.
i had the first job working now i added the second job and my widjet fails.
the errors:



help ?
 

droidman

Member
Licensed User
Longtime User
i think that i was not putting any value inside the variable "res" and that was the problem.
but this works on the emulator but not on my android galaxy s3 i have no idea why
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…