Reputation: 2148
I'm using the startScan
method of a BluetoothLeScanner
to collect information about available devices. However, I need to know when the scan has finished. There are no methods in the callback that seem to indicate this.
How can I know when the scan has completed?
Upvotes: 1
Views: 1928
Reputation: 8134
You can use stopScan() when you complete the functionality for scanning devices.
So it is more like the scan completes when you want it to, depending on whether you would want the scan to stop based on a time criteria or say after a few devices are found.
The decision point to do that would be ScanCallback functions and results.
ScanResult can help.
Upvotes: 3