GuidesComponentsApp UI components

BluetoothStateNotice

Show Bluetooth availability and offer a permission or settings action

  • Stable unknown
  • Release candidate since 1.16.1-rc.3
  • Development since 1.16.1-dev.2111+9796905

BluetoothStateNotice observes Bluetooth radio and permission state. It renders a themed card when Bluetooth is unavailable and returns no UI while the radio is on. It does not scan or establish a Bluetooth session.

import { BluetoothStateNotice } from "@ovok/native/ui";

<BluetoothStateNotice
  bleManager={bleManager}
  onOpenSettings={() => navigation.navigate("BluetoothSettings")}
/>

Pass the app's long-lived BleManager so the notice observes the same radio state as the Bluetooth feature. Without a manager, the state is unsupported.

States and actions

StateDefault behavior
onRender nothing.
unauthorizedShow an access button; the default action requests Bluetooth permission.
offShow an action that opens Bluetooth settings.
unsupportedExplain that Bluetooth LE is unavailable; no action button.

The default permission request uses react-native-permissions. Provide requestPermission to use app-specific permission logic. Provide onOpenSettings to own the settings action; otherwise, the component opens Bluetooth settings through the platform link.

Props

Every prop, with its type and description, is listed in the @ovok/native/ui API reference.

Last updated on

On this page