Android Question Thread-Error

D

Deleted member 103

Guest
Hi,

this log-line shows an error I do not understand, can someone tell me what it means?

Log("endedOK=" & endedOK & " ;error=" & error)
Error-Log:
endedOK=false ;error=Exception : Wrong number of arguments; expected 4, got 0

B4X:
Sub GetAtomTime
    If mBBL.IsInternetConnected Then
        Dim args(0) As Object
        Thread1.Start(Me, "Get_Current_Time", args)
    End If
End Sub

Sub Get_Current_Time
    Dim str() As String = Regex.Split("—", Starter.manager.getString("lstTimeServer"))
    Dim TimeServer As String = str(1).Trim
'    Log("TimeServer=" & TimeServer)
    sntp.NtpServerName = TimeServer              ' only needed if you don't want to use the default server "0.us.pool.ntp.org"
    sntp.TimeOut = 10000                      ' only needed if you don't want to use the default timeout value of 30000 milliseconds (30 seconds)
    sntpticks = sntp.getGmtNtpTime
End Sub

Sub Thread1_Ended(endedOK As Boolean, error As String) 'The thread has terminated. If endedOK is False error holds the reason for failure
    Dim args(0) As Object
    ' to perfom giu-actions directly after receiving the time
    ' we have to do this with the help of a separate gui-thread
    Log("endedOK=" & endedOK & " ;error=" & error)
    Thread2.RunOnGuiThread("Show_Results", args)
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…