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.
Returns
Section titled “Returns”one of 'unknown' | 'unsupported' | 'unauthorized' | 'off' | 'on'.
Example
Section titled “Example”const bluetooth = useBluetoothState();if (bluetooth === 'off') return <TurnOnBluetoothPrompt />;