onDeviceSelectionRequired
When autoConnect is enabled, the manager waits for its settle interval. It connects the only candidate automatically. If more than one accepted device is found, it calls onDeviceSelectionRequired with the candidates and a select(device) function.
<BTProvider
{...providerProps}
autoConnect
autoConnectDelayMs={700}
onDeviceSelectionRequired={({ devices, select }) => {
setPendingDeviceSelection({ devices, select });
}}
/>
Call the supplied select function with one of the candidate objects after the user chooses. It connects that candidate and rejects if the device was forgotten before the selection was applied. Do not call connect on every candidate.
Use BluetoothDevicePicker to render the candidates. If the app does not provide this callback, multiple candidates are not automatically selected.