Hi.
I am using AsyncStreamsText to receive data over BT.
If I manually name the BT device in my code, all works great.
But I would like to allow user selection of the BT device.
This is the code in Starter:
Any thoughts?
Thank you
Andrew
I am using AsyncStreamsText to receive data over BT.
If I manually name the BT device in my code, all works great.
But I would like to allow user selection of the BT device.
This is the code in Starter:
B4X:
Private Sub admin_DeviceFound (Name As String, MacAddress As String)
Log($"Device found: ${Name}"$)
Dim selectedname As String = "BT2"
If Name = selectedname Then
Log("Trying to connect...")
admin.CancelDiscovery
serial.Connect(MacAddress)
End If
End Sub
Any thoughts?
Thank you
Andrew