Android Question Bluetooth Connection

Declan

Well-Known Member
Licensed User
Longtime User
I am using the following code to receive a connection from a BT device:
B4X:
Sub Admin_DeviceFound (Name As String, MacAddress As String)
    Log(Name & ":" & MacAddress)
    Dim nm As NameAndMac
    nm.Name = Name
    nm.Mac = MacAddress
    foundDevices.Add(nm)
    ProgressDialogShow("Searching for devices (~ Devices found)...".Replace("~", foundDevices.Size))
End Sub
All is great and connection is established.
However, this takes a loooooong time, even once a device has been found.
How can I halt the searching once a device has been found?

ps. Wishing all a safe, healthy and prosperous 2016
 
Top