Hi,
I am trying to send some text from a sub in a service to a label in the activity.
I always get an error
Service
Activity
Error
I am trying to send some text from a sub in a service to a label in the activity.
I always get an error
Service
B4X:
Sub WinRESTSocket_NewConnection (Successful As Boolean, NewSocket As Socket)
If Successful Then
IncomingStream.Initialize(NewSocket.InputStream, NewSocket.OutputStream, "IncomingStream")
CallSubDelayed2(Main,"ShowLog","Connected to WinREST")
End If
WinRESTSocket.Listen
End Sub
Activity
B4X:
Sub ShowLog(Text2show As String, clear As Boolean)
If clear = True Then
lblStatus.text=""
Else
lblStatus.text = lblStatus.text & Text2show & CRLF
End If
End Sub
Error
B4X:
-------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (CallSubDelayed - ShowLog)
running waiting messages (1)
An error occurred:
(Line: 61) End Sub
java.lang.Exception: Sub showlog signature does not match expected signature.
public static anywheresoftware.b4a.pc.RemoteObject p2g.Wrst2Zarph.main_subs_0._showlog(anywheresoftware.b4a.pc.RemoteObject,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception
class anywheresoftware.b4a.pc.RemoteObject,