TL;DR: Can you be connected to devices and scan for more devices at the same time?
I'm working on an app that talks to devices using BLE. A colleague who just finished a BLE project warned me that you can't be connected to devices and scan at the same time or bad things will happen. I've gone forward with this assumption. So currently I connect and disconnect on each screen.
Connection times can take ~3+ seconds sometimes so I'd like to speed this up by not disconnecting if I'm deep in the app (which is also where you can scan for more devices). I've played with it a little and everything seems fine (doing both at the same time).
I've read in the Android docs that you can't scan for Bluetooth and BLE at the same time but I haven't seen anything about being connected to BLE devices and scanning for BLE devices.
Some of the symptoms my colleague described were:
- Unable to turn off system Bluetooth (the switch would turn back on)
- Bluetooth would crash (not sure if it was Bluetooth Share or something else)
- Other apps doing Bluetooth stuff would crash