Interface BluetoothOptions

Bluetooth Options interface

interface BluetoothOptions {
    allowAllDevices?: boolean;
    deviceFound?: ((device, selectFn) => boolean);
    referringDevice?: BluetoothDevice;
    scanTime?: number;
}

Properties

allowAllDevices?: boolean

Optional flag to automatically allow all devices

deviceFound?: ((device, selectFn) => boolean)

A device found callback function to allow the user to select a device

Type declaration

    • (device, selectFn): boolean
    • Parameters

      • device: BluetoothDevice
      • selectFn: (() => void)
          • (): void
          • Returns void

      Returns boolean

referringDevice?: BluetoothDevice

An optional referring device

scanTime?: number

The amount of seconds to scan for the device (default is 10)