在后台扫描Android 8+上的BLE设备

时间:2018-10-12 10:52:19

标签: android bluetooth bluetooth-lowenergy android-ble bluetooth-gatt

我正在通过Android 8+上的BLE扫描程序API使用以下方法 扫描BLE信标

startScan(List<ScanFilter> filters, ScanSettings settings, 
PendingIntent callbackIntent)

问题在于,有时我可以看到“扫描日志”,但是callbackIntent没有提供任何信息,为什么会发生这种情况?

1 个答案:

答案 0 :(得分:0)

这是Android 8+上的预期行为。如果需要连续扫描,则在这种情况下需要一种周期性的机制。有关在不同的Android版本和不同方式上进行扫描的更多信息。看看here