One problem left , how to get the advertising data:
Private Sub Scan_Result (Result As Object)
'Log("Scan_Result")
Dim ScanResult As JavaObject = Result
Dim device As JavaObject = ScanResult.RunMethod("getDevice", Null)
Dim address As String = device.RunMethod("getAddress", Null)
ManagerJO.GetFieldJO("devices").RunMethod("put", Array(address, device))
Dim name As String
Dim o As Object = device.RunMethod("getName", Null)
If o = Null Then name = "" Else name = o
Dim ScanRecord As JavaObject = ScanResult.RunMethod("getScanRecord", Null)
'Log(ScanRecord) 'you can extend the code to access the data.
'https://developer.android.com/reference/android/bluetooth/le/ScanRecord
Dim rssi As Double = ScanResult.RunMethod("getRssi", Null)
[B]Manager_DeviceFound(name, address, CreateMap(), rssi)[/B]
End Sub
ManagerDevice found expect a map:
developer.android.com
In the log the scanrecord : (ScanRecord) ScanRecord [mAdvertiseFlags=6, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -3, -91, 6, -109, -92, -30, 79, -79, -81, -49, -58, -21, 7, 100, 120, 37, 18, 94, 86, 120, -61]}, mServiceData={00007364-0000-1000-8000-00805f9b34fb=[1, -86, -69, -52, -35, -18, -1, 0, 17, 34, 51, 68, 85]}, mTxPowerLevel=4, mDeviceName=CCheck]
When i get the manufacturer specific date like this :
Dim B As Object = ScanRecord.RunMethod("getManufacturerSpecificData", Null)
Result:{76=[B@39da68d}
How do i convert the result in a similar map like the advertising data from BLEmanager2 so i can parse it by the BeaconParser?
(MyMap) {1=[B@da87e20, -1=[B@3eba3d9, 10=[B@a17119e, 22=[B@164d47f, 9=[B@9e75c4c, 0=[B@469a495}