如何在android的beacon类中为ibeacon数据包设置LE可发现标志

时间:2017-09-20 09:54:19

标签: android bluetooth-lowenergy ibeacon advertising

我正在使用信标类(inputFormat),这样就可以创建 ibeacon 广告包。

然而,数据包的前3个字节不同(广告标志,根据ibeacon标准应为0x020106,包含标志0x06,代表" LE一般可发现")。

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

1 个答案:

答案 0 :(得分:0)

图书馆的BeaconTransmitter课程基于Android的原生BluetoothLeAdvertiser:

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

不幸的是,该类没有能力配置广告包中设置的特定标志。结果,您将看到您所见过的默认值。