Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private ser As Serial
Private sad As BluetoothAdmin
Private li As List
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
ser.Initialize("etest")
sad.Initialize("sad")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
Dim btdev As Map
Dim l As List
' l.Initialize
' btdev=ser.GetPairedDevices
'
'
' For i=0 To btdev.Size-1
' l.Add(btdev.GetKeyAt(i))
' Log(btdev.GetKeyAt(i))
' Next
li.Initialize
sad.StartDiscovery
End Sub
Private Sub sad_DeviceFound (Name As String, MacAddress As String)
Dim dummy As String
dummy=Name & ";" & MacAddress
li.Add(dummy)
End Sub
Private Sub sad_DiscoveryFinished
If li.Size=0 Then
MsgboxAsync("nix gefunden","wfdew")
End If
For i=0 To li.Size-1
MsgboxAsync(li.Get(i),"test")
Next
End Sub