Skip to main content

useBTDevice

No behavioral description is attached to this declaration. The public signature, parameter and return types, and source location below document its published contract.

Kind: React hook
Package: @ovok/native

Import​

import { useBTDevice } from '@ovok/native/bt-management';

TypeScript signatures​

(model: DeviceKey, { id, autoConnect, allowRawAccess }?: UseBTDeviceOptions): { model: DeviceKey; devices: RuntimeDevice[]; device: RuntimeDevice | undefined; requiresSelection: boolean; status: DeviceStatus | undefined; latestResult: RuntimeResult | undefined; results: readonly RuntimeResult[]; events: readonly DeviceConnectionEvent[]; select: any; connect: any; disconnect: any; raw: RawBluetoothAccess | undefined; }
ParameterTypeDetails
modelDeviceKey—
__1UseBTDeviceOptions—

Returns: { model: DeviceKey; devices: RuntimeDevice[]; device: RuntimeDevice | undefined; requiresSelection: boolean; status: DeviceStatus | undefined; latestResult: RuntimeResult | undefined; results: readonly RuntimeResult[]; events: readonly DeviceConnectionEvent[]; select: any; connect: any; disconnect: any; raw: RawBluetoothAccess | undefined; }.

Learn the workflow​

Continue with Bluetooth for the workflow context and examples.

Source​

View the declaration in the SDK source.