scan Async
Starts a scan for bluetooth devices Can be used without duration running until stopScan is called.
If only one device is required consider using scanFor
Parameters
Used to specify attributes of the devices on the scan
Native object to specify the scan settings (The default setting is only recommended for really fast scans)
Scan time limit, when exceeded stops the scan (Ignored when less then 0)
Callbacks:
Called when the scan is finished with an Array of Bluetooth devices found
Called whenever a new bluetooth device if found (Useful on realtime scans)
Called whenever the list changes (e.g new device discovered, device name changed etc...)
Called whenever an error occurs on the scan (Of which will be automatically halted in case of errors)
See also
For a variation using coroutines suspended functions