# Bluetooth types

Canonical page: https://docs.ovok.com/native-sdk/guide/components/bt-management/types

Import public Bluetooth types from `@ovok/native/bt-management` unless noted otherwise. The accepted-device tuple is the source of compile-time narrowing for callbacks such as `onResult` and `onDeviceFound`.

## Device and session types [#device-and-session-types]

| Type | Use |
| --- | --- |
| `AcceptedDevice` | A built-in `IntegratedDevices` value or a branded `CustomDeviceDefinition`. |
| `IntegratedDevices` | Enum of the integrated device identifiers. |
| `DeviceKey` / `DeviceKeyOf<T>` | Device key union and key derived from an accepted-device tuple. |
| `DeviceData` | Peripheral ID, name, local name, manufacturer data, optional manufacturer/model, serial, and supported measurement types. |
| `DeviceStatus` | Compact status values: connected, disconnected, measuring, and low battery. |
| `BTProviderProps<T>` | Provider options and callbacks for a particular accepted-device tuple. |

## Event and result types [#event-and-result-types]

| Type | Use |
| --- | --- |
| `ResultCallback<T>` | Device metadata, normalized reading, and stable enumerable result ID (the runtime property is non-writable). |
| `DeviceStatusChangeCallback` | Device metadata, status, and optional measurement key. |
| `DeviceConnectionEvent` | Pairing, bonding, battery, and history-download events. |
| `ErrorCallback` / `BluetoothError` | Normalized error details and optional stable error code. |
| `DeviceResultPolicy` / `ResultPolicy` | Result filtering defaults and per-measurement overrides. |

The runtime `result.id` is enumerable and non-writable, so it is retained by object spreads and JSON serialization. Its TypeScript field is typed as `string`; treat it as an identifier and do not reassign it. Use it as an explicit idempotency key for retried writes. The event and callback pages document when each payload is delivered.

## Background and custom declaration types [#background-and-custom-declaration-types]

- `BackgroundSyncOptions`, `BackgroundSyncResult`, and `BackgroundSyncStorage` describe queued delivery, persistence, retries, restoration, notifications, and Android foreground service configuration. See [Background sync](/native-sdk/guide/modules/background-sync).
- `CustomDeviceSpec` and `CustomDeviceDefinition` describe the input declaration and its validated runtime result.
- `CustomServiceSpec`, `CustomMonitorSpec`, `CustomFrameSpec`, `CustomCaseSpec`, `CustomFieldSpec`, and `CustomChecksumSpec` describe GATT, framing, measurement fields, and checksums.
- `CustomMeasurementSpec` supports multiple measurements in a frame; `CustomLepuSpec` describes the specialized Lepu/Viatom framing.
- `DeviceConnectionEventKind`, `DeviceStatus`, and the callback payload types define the app-facing event surface.

For an end-to-end setup, see [Bluetooth](/native-sdk/guide/modules/bt-management), [BTProvider](/native-sdk/guide/components/bt-management/bt-provider/), and [custom devices](/native-sdk/guide/components/bt-management/custom-devices/).
