log cat prints I/BluetoothAdapter: startDiscovery every 500 ms
Borna-f opened this issue · 4 comments
Any opinion that why sometimes I get spammed with I/BluetoothAdapter: startDiscovery in logcat?
What are you doing when this happens?
I don't know. On application launch I add a device to native scan filter, I start the scan, then stop the scan and start the scan again (by the way this is how native scan filter actually gets updated !)
You're going to get that message anytime you start a scan. However, using startDiscovery is a trick that is used a lot to fix other problems, especially relating to bonding. Are you using bonding at all?
FYI:
If you just call startScan() without passing in a ScanOptions object, SweetBlue will default to "infinite" scan. What happens is that the scan gets stopped every 10 seconds, pauses for .5 secs, then starts again. These values can be changed via BleManagerConfig.infiniteScanInterval, and BleManagerConfig.infinitePauseInterval.
In short, I don't think there's any problem, that message will show up anytime a new scan is started.
Closing this as there doesn't seem to be an actual problem. If there is, feel free to either re-open this, or create a new issue