Hi
I have a question . Where is BLE variables definition ?
1. place BLE variables in "Application_Start" , but can not raised StateChanged event
2. place BLE variables in "Process_Globals", all is ok
Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Dim maps As Map
Private ConnectedName As String
Public ConnectedId As String
Private ConnectedServices As List
Public currentStateText As String = "UNKNOWN"
Public currentState As Int
Public Connected As Boolean = False
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
NavControl.NavigationBarVisible = False
NavControl.ToolBarVisible = False
' definition variable is here , can not raised StateChanged event
Dim manager1 As BleManager
Dim manager2 As BleManager
Dim manager3 As BleManager
manager1.Initialize("manager")
manager2.Initialize("manager")
manager3.Initialize("manager")
End Sub
'------------------------------------------------------------
' BLE Part
'------------------------------------------------------------
Sub Manager_StateChanged (State As Int)
Log("-------------- Manager_StateChanged ---------------")
Dim m As BleManager
m = Sender
LogColor("sender:" & Sender, Colors.Yellow)
LogColor("m:" & m, Colors.Magenta)
End Sub
#if OBJC
#import <CoreBluetooth/CoreBluetooth.h>
#End If