本文介绍了在后台扫描Android 8+上的BLE设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Android 8+
上的BLE扫描程序API中的以下方法来扫描BLE信标
I'm using the following method from BLE scanner API on Android 8+to scan for BLE Beacons
startScan(List<ScanFilter> filters, ScanSettings settings,
PendingIntent callbackIntent)
问题是有时候之后我可以看到扫描日志,但是 callbackIntent
没有提供任何信息吗,这是为什么?
The problem is that after sometimes I can see Scan Logs but nothing is delivered by the callbackIntent
any idea why is this happening?
推荐答案
这是Android 8+上的预期行为。如果需要连续扫描,则在这种情况下需要一种周期性的机制。有关在不同的Android版本和不同方式上进行扫描的更多信息。在
This is the expected behavior on Android 8+. if you need to scan continuously a periodic mechanism is needed in this case. For more information about scanning on different Android versions and different ways. Have a look here
这篇关于在后台扫描Android 8+上的BLE设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!