Scanning for BLE devices on Android 8+ in the background

穿精又带淫゛_ 提交于 2019-12-08 08:36:27

问题


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)

The problem is that after sometimes I can see Scan Logs but nothing is delivered by the callbackIntent any idea why is this happening?


回答1:


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



来源:https://stackoverflow.com/questions/52777982/scanning-for-ble-devices-on-android-8-in-the-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!