Hello, i am trying to find the mac adress in ible Devicefound
In B4a id contains the mac adress. In B4i id contains something different, but not Mac Adress
We have several devices (same type, same Name, same services) and have to choose which one to connect, thats why i show
the last 4 characters of Mac Adress.
How can i do this with B4I ?
Thanks for help
Marion
In B4a id contains the mac adress. In B4i id contains something different, but not Mac Adress
We have several devices (same type, same Name, same services) and have to choose which one to connect, thats why i show
the last 4 characters of Mac Adress.
How can i do this with B4I ?
B4X:
Public Sub Manager_DeviceFound (Name As String, id As String, AdvertisingData As Map, RSSI As Double)
Dim na(20) As String
Dim i,k As Int
If Name.StartsWith("TO") Or Name.StartsWith("MEGA") Or Name.StartsWith("MP") Or Name.StartsWith("FE") Or Name.StartsWith("Fe") Or Name.StartsWith(".") Or Name.StartsWith("Ho") Or Name.StartsWith("HO") Then
PSelect.clvSelect.DefaultTextBackgroundColor = Var.limadarkblue
#if b4i
' Log(AdvertisingData.Values)
PSelect.clvSelect.add(PSelect.CreateListItem(Name , "D"),id & "/" & Name)
#Else
PSelect.clvSelect.add(PSelect.CreateListItem(Name & " (" & id.SubString(12) & ")" , "D"),id & "/" & Name)
#end if
Else
PSelect.clvSelect.DefaultTextBackgroundColor = Var.limablue
PSelect.clvSelect.add(PSelect.CreateListItem(Name ,"T"),id & "/" & Name)
End If
PSelect.clvSelect.Refresh
end sub
Thanks for help
Marion