Hi,
I have a problem with bluetooth connection. I have an Arduino that send some data over a bluetooth connection. I use code derived from your bluetooth example. The connection is established ok, but the NewText event in chatactivity is never raised although the arduino sends (ASCII)data. I use the data transfer without prefix. There are no compiler errors or java errors.
Here are the main parts of the code:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("2")
If AStream.IsInitializm_ed = False Then AStream.Initialize("CoDisplay", "AStream", Main.serial1.InputStream, Main.serial1.OutputStream)
End If
txtLog.Text = "" 'clear Text
txtLog.Width = 100%x
End Sub
Sub AStream_NewText (InText As String)
' for unknown reasons, its newtext and not NewText in the above call. Problem must be in the class AsyncStreamsText
LogMessage(InText)
' Parse the temperature from the entire string
If InText.Length > 5 Then
If InText.SubString2(0,6) = "Ext = " Then
Temp = InText.SubString2(6,InText.Length)
Temperature.Text = Temp
End If
End If
ToastMessageShow("Hallo", True)
End Sub
Thanks for any help or suggestions,
Georg