After clicking scan the code path in Starter Module is:
B4X:
Sub Scan
manager.Scan(Null)
End Sub
Sub Manager_DeviceFound (Name As String, Id As String, AdvertisingData As Map, RSSI As Double)
Log("Found: " & Name & ", " & Id & ", RSSI = " & RSSI & ", " & AdvertisingData)
ConnectedName = Name
manager.StopScan
manager.Connect(Id)
End Sub
Sub Manager_Disconnected
Log("Disconnected")
connected = False
CallSub(Main, "StateChanged")
End Sub