BluetoothDevicePicker
BluetoothDevicePicker is a theme-aware modal for presenting multiple BTDeviceSelection candidates. It is a view only: your callback decides how a choice affects the Bluetooth session.
Import it from @ovok/native/bt-management.
Connect it to auto-connect
When BTProvider has autoConnect enabled and more than one candidate is found during the settle window, it calls onDeviceSelectionRequired. Keep the supplied candidates and select callback in screen state, then pass them to the picker.
<BluetoothDevicePicker
devices={selection.devices}
visible={selection !== undefined}
onSelect={(device) => {
void selection.select(device);
setSelection(undefined);
}}
onDismiss={() => setSelection(undefined)}
/>
Call the selection object's select(device) function. The picker calls your onSelect; it does not connect by itself.
Props
| Prop | Purpose |
|---|---|
devices | Read-only candidates from onDeviceSelectionRequired. |
visible | Controls the modal. |
title | Heading; defaults to “Choose a device”. |
onSelect | Called with the chosen candidate. |
onDismiss | Optional backdrop, system-close, and dismiss-button handler. |
dismissLabel | Dismiss button label; defaults to “Not now”. |
getDeviceImage | Resolves an optional image URI for a candidate. |
labelForDevice | Resolves the primary label; defaults to the SDK device title. |
renderRow | Replaces a row; receives the candidate and a select() action. |
theme and slots | Optional theme and primitive overrides from OvokUiProps. |
testID | Test identifier for the modal and backdrop. |
The default row shows the device title and, when different, its model. Use renderRow when your product needs status, extra instructions, or a different accessible layout.
See the callback contract and the Bluetooth guide.