The current Bluetooth scan is hard coded to take 5 seconds, after which it will report back any smart puzzles it found.
We would prefer to be notified immediately of any discovered smart puzzles instead of waiting the full 5 seconds.
Proposed Implementation
Add a callback to the Bluetooth Scan which will be called whenever a smart puzzle is discovered. The UI can pass in a callback which will update the UI when needed.
It would also be good to add a parameter to customize the duration of the Bluetooth Scan.
NOTE: The chosen implementation of this ticket also creates the first iteration of a "Smart Puzzle Registry" of sorts, which provides globally available access to currently discovered and/or connected smart puzzles.
The current Bluetooth scan is hard coded to take 5 seconds, after which it will report back any smart puzzles it found.
We would prefer to be notified immediately of any discovered smart puzzles instead of waiting the full 5 seconds.
Proposed Implementation
Add a callback to the Bluetooth Scan which will be called whenever a smart puzzle is discovered. The UI can pass in a callback which will update the UI when needed.
It would also be good to add a parameter to customize the duration of the Bluetooth Scan.