Skip to main content

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​

PropPurpose
devicesRead-only candidates from onDeviceSelectionRequired.
visibleControls the modal.
titleHeading; defaults to “Choose a device”.
onSelectCalled with the chosen candidate.
onDismissOptional backdrop, system-close, and dismiss-button handler.
dismissLabelDismiss button label; defaults to “Not now”.
getDeviceImageResolves an optional image URI for a candidate.
labelForDeviceResolves the primary label; defaults to the SDK device title.
renderRowReplaces a row; receives the candidate and a select() action.
theme and slotsOptional theme and primitive overrides from OvokUiProps.
testIDTest 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.