如何为 android 的 beacon class 内的 ibeacon 数据包设置 LE 可发现标志

How to set LE discoverable flag for ibeacon packet inside beacon class of android

我正在使用信标 class (altbeacon.beacon.Beacon),它可以创建一个 ibeacon 广告包。

但是数据包的前 3 个字节有所不同(广告标志,根据 ibeacon 标准应为 0x020106,其中包含代表 "LE general discoverable" 的标志 0x06)。

我没有找到在信标库中设置这些字节的方法。有没有办法设置这些标志?

库的 BeaconTransmitter class 基于 Android 的原生 BluetoothLeAdvertiser:

https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html

不幸的是,class 无法配置广告数据包中设置的特定标志。结果,您只剩下您所看到的默认值。