Anyone can detect the problem ?
B4X:
Sub Process_Globals
Dim ph As PhoneVibrate
Dim tw As TextWriter
Dim Socket1 As Socket
End Sub
Sub Globals
Private Button6 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
Socket1.Initialize("Socket1")
Socket1.Connect("192.168.1.111", 403, 20000)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button6_Click
tw.Initialize(Socket1.OutputStream)
tw.Writeline("Doner sandwich")
tw.Flush
Socket1.Close
ToastMessageShow("Doner sandwich ?",False)
ph.Vibrate(100)
End Sub
Sub Socket1_Connected (Successful As Boolean)
If Successful = False Then
Msgbox(LastException.Message, "Error connecting")
Return
End If
ToastMessageShow("Connected successfully", False)
Button6.Visible = True
End Sub
Last edited: