BA 3.82
I have:
Dim bAdmin As BluetoothAdmin
in a service. It is initialized as
bAdmin.Initialize("bAdmin") '
In my code I start a discovery with
I detect the results with
btManager is my state machine helper class.
In my log I get:
15:35:56:783::main 4->5
Start discovery set true
ignoring event: badmin_discoverystarted
15:35:56:838::btManager 1->3
bAdmin_DiscoveryStarted sub
15:35:57:158::main 5->11
ignoring event: badmin_discoverystarted
bAdmin_DiscoveryStarted sub
ignoring event: badmin_discoveryfinished
bAdmin_DiscoveryFinished sub
15:36:09:441::btManager 4->1
15:36:09:673::main 11->4
This, and breakpoints, suggest that the bAdmin_DiscoveryStarted sub is called twice. There are also the three ignoring event messages in the log.
Is this as it should be?
I have:
Dim bAdmin As BluetoothAdmin
in a service. It is initialized as
bAdmin.Initialize("bAdmin") '
In my code I start a discovery with
B4X:
If bAdmin.StartDiscovery = False Then
Log("error starting discovery")
Else
btManager.LogGoToState(3)
End If
I detect the results with
B4X:
Sub bAdmin_DiscoveryStarted
Log("bAdmin_DiscoveryStarted sub")
btManager.EventRun(Main.EVT_DiscoveryStarted,Null)
End Sub
Sub bAdmin_DiscoveryFinished
Log("bAdmin_DiscoveryFinished sub")
btManager.EventRun( Main.EVT_DiscoveryFinished,Null)
End Sub
btManager is my state machine helper class.
In my log I get:
15:35:56:783::main 4->5
Start discovery set true
ignoring event: badmin_discoverystarted
15:35:56:838::btManager 1->3
bAdmin_DiscoveryStarted sub
15:35:57:158::main 5->11
ignoring event: badmin_discoverystarted
bAdmin_DiscoveryStarted sub
ignoring event: badmin_discoveryfinished
bAdmin_DiscoveryFinished sub
15:36:09:441::btManager 4->1
15:36:09:673::main 11->4
This, and breakpoints, suggest that the bAdmin_DiscoveryStarted sub is called twice. There are also the three ignoring event messages in the log.
Is this as it should be?