You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be valuable to have ScanRecord object passed in Beacon object. Currently there is only the raw byte[] buffer - it is difficult to extract vender specific information from raw data.
The text was updated successfully, but these errors were encountered:
Thanks for the nice idea. Right now, there is just array of bytes because BluetoothAdapter.LeScanCallback provides it by default. It's possible to return ScanRecord object as well, but we need to provide a method to convert bytes into this object. As far as I see ScanRecord doesn't have anything like that in the public API, but I'm pretty sure it must be hidden somewhere in the source of files in android.bluetooth.le package. Once I figure it out, I'll add this. Of course PRs are welcome, if you want this feature quicker :).
I've added this feature on scanresult-in-beacon branch, but it works LollipopScanStrategy only for now. It means it will work for Lollipop Android version or higher. I'm not sure if it's possible to add it in PreLollipopScanStrategy with the API provided before Lollipop. Right now, ScanResult in Beacon class will be null in Android version older than Lollipop. You can test and investigate it on the feature branch.
Sorry, I've added ScanResult instead of ScanRecord, but ScanRecord can be extracted from it and it still works for Lollipop or higher only. I'll investigate it further.
It would be valuable to have ScanRecord object passed in Beacon object. Currently there is only the raw byte[] buffer - it is difficult to extract vender specific information from raw data.
The text was updated successfully, but these errors were encountered: