Skip to content

useBluetoothState

useBluetoothState(): BluetoothState

Defined in: console-sdk/src/react/hooks/useBluetoothState.ts:54

The current Bluetooth adapter/radio state (SDK_PLAN.md §3.6.1). Reactive: re-renders only when the adapter facet actually changes, and 'unknown' until the transport delivers its first reading (the documented zero state, §3.9.1). Safe from the first render; throws OutsideProviderError when no <ConsoleProvider> is above the caller.

BluetoothState

one of 'unknown' | 'unsupported' | 'unauthorized' | 'off' | 'on'.

const bluetooth = useBluetoothState();
if (bluetooth === 'off') return <TurnOnBluetoothPrompt />;