Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BluetoothActions

Hierarchy

  • BluetoothActions

Index

Properties

frequency: number

Methods

  • checkPermission(onGrantedCallback: string, onDeniedCallback: string, onBluetoothError: string): void
  • Check the user has granted permission to use Bluetooth on this device. If permission has not been granted, display the Bluetooth Permissions dialog.

    Parameters

    • onGrantedCallback: string

      function name to call if permission has been granted.

    • onDeniedCallback: string

      function name to call if permission has been denied.

    • onBluetoothError: string

      function name to call if an error occurs.

      var uActions = require('u-actions');
      uActions.bluetooth.checkPermission("bleOnGrantedCallback", "bleOnDeniedCallback", "bleOnBluetoothError")

    Returns void

  • clearState(componentId: string): void
  • Parameters

    • componentId: string

    Returns void

  • connect(deviceName: string): void
  • Parameters

    • deviceName: string

    Returns void

  • enable(): void
  • Returns void

  • read(serviceId: string, characteristicId: string, callback: Function): void
  • Read from a characteristic of a service.

    Parameters

    • serviceId: string
    • characteristicId: string
    • callback: Function

    Returns void

  • write(serviceId: string, characteristicId: string, value: string): void
  • Write to a characteristic of a service.

    Parameters

    • serviceId: string
    • characteristicId: string
    • value: string

    Returns void