蓝牙Android Ble

Android Ble蓝牙广播的频率

2019-03-19  本文已影响0人  让一切简单

使用低功耗蓝牙发送蓝牙广播的设置。

AdvertiseSettings settings = new AdvertiseSettings.Builder()
                    .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_POWER)
                    .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_MEDIUM)
                    .setTimeout(0)
                    .build();

频率:

setAdvertiseMode
* 设置频率:
     * ADVERTISE_MODE_LOW_LATENCY 100ms
     * ADVERTISE_MODE_LOW_POWER 1s
     * ADVERTISE_MODE_BALANCED  250ms

信号强度:

setTxPowerLevel
设置信号强度
上一篇 下一篇

猜你喜欢

热点阅读