BTService

com.rscja.deviceapi.service

## Class BTService

- java.lang.Object
- - Service
  - - com.rscja.deviceapi.service.BTService

-     public class BTService
      extends Service

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BTService.LocalBinder`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ACTION_DATA_AVAILABLE`
    `static java.lang.String` | `ACTION_GATT_CONNECTED`
    `static java.lang.String` | `ACTION_GATT_DISCONNECTED`
    `static java.lang.String` | `ACTION_GATT_SERVICES_DISCOVERED`
    `static java.lang.String` | `ACTION_SEARCH_DEVICES`
    `static java.lang.String` | `BT_DEVICE`
    `static java.lang.String` | `BT_RECORD`
    `static java.lang.String` | `BT_RSSI`
    `static java.util.UUID` | `CCCD`
    `static java.lang.String` | `DEVICE_DOES_NOT_SUPPORT_UART`
    `static java.lang.String` | `DEVICE_INITED_BT_COMMUNICATE`
    `static java.util.UUID` | `DIS_UUID`
    `static java.lang.String` | `EXTRA_DATA`
    `static java.util.UUID` | `FIRMWARE_REVISON_UUID`
    `static boolean` | `isWrite`
    `static java.util.UUID` | `RX_CHAR_UUID`
    `static java.util.UUID` | `RX_SERVICE_UUID`
    `static java.util.UUID` | `TX_CHAR_UUID`
    `static java.util.UUID` | `TX_POWER_LEVEL_UUID`
    `static java.util.UUID` | `TX_POWER_UUID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BTService()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `boolean` | `connect(java.lang.String address, RFIDWithUHFBluetooth.BTStatusCallback btStatusCallback)`
    `void` | `disconnect()`
    `void` | `enableTXNotification()`
    `RFIDWithUHFBluetooth.StatusEnum` | `getBTConnectStatus()`
    `java.util.List<BluetoothGattService>` | `getSupportedGattServices()`
    `boolean` | `initialize()`
    `IBinder` | `onBind(Intent intent)`
    `boolean` | `onUnbind(Intent intent)`
    `boolean` | `readCharacteristic(BluetoothGattCharacteristic characteristic)`
    `void` | `setKeyEventCallback(RFIDWithUHFBluetooth.KeyEventCallback KeyEventCallback)`
    `void` | `startBTScan(RFIDWithUHFBluetooth.ScanBTCallback scanBTCallback)`
    `void` | `stoptBTScan()`
    `boolean` | `writeRXCharacteristic(byte[] value)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BT_RSSI

          public static final java.lang.String BT_RSSI

      See Also:
        Constant Field Values

    - #### BT_RECORD

          public static final java.lang.String BT_RECORD

      See Also:
        Constant Field Values

    - #### BT_DEVICE

          public static final java.lang.String BT_DEVICE

      See Also:
        Constant Field Values

    - #### isWrite

          public static boolean isWrite

    - #### ACTION_SEARCH_DEVICES

          public static final java.lang.String ACTION_SEARCH_DEVICES

      See Also:
        Constant Field Values

    - #### ACTION_GATT_CONNECTED

          public static final java.lang.String ACTION_GATT_CONNECTED

      See Also:
        Constant Field Values

    - #### ACTION_GATT_DISCONNECTED

          public static final java.lang.String ACTION_GATT_DISCONNECTED

      See Also:
        Constant Field Values

    - #### ACTION_GATT_SERVICES_DISCOVERED

          public static final java.lang.String ACTION_GATT_SERVICES_DISCOVERED

      See Also:
        Constant Field Values

    - #### ACTION_DATA_AVAILABLE

          public static final java.lang.String ACTION_DATA_AVAILABLE

      See Also:
        Constant Field Values

    - #### EXTRA_DATA

          public static final java.lang.String EXTRA_DATA

      See Also:
        Constant Field Values

    - #### DEVICE_DOES_NOT_SUPPORT_UART

          public static final java.lang.String DEVICE_DOES_NOT_SUPPORT_UART

      See Also:
        Constant Field Values

    - #### DEVICE_INITED_BT_COMMUNICATE

          public static final java.lang.String DEVICE_INITED_BT_COMMUNICATE

      See Also:
        Constant Field Values

    - #### TX_POWER_UUID

          public static final java.util.UUID TX_POWER_UUID

    - #### TX_POWER_LEVEL_UUID

          public static final java.util.UUID TX_POWER_LEVEL_UUID

    - #### CCCD

          public static final java.util.UUID CCCD

    - #### FIRMWARE_REVISON_UUID

          public static final java.util.UUID FIRMWARE_REVISON_UUID

    - #### DIS_UUID

          public static final java.util.UUID DIS_UUID

    - #### RX_SERVICE_UUID

          public static final java.util.UUID RX_SERVICE_UUID

    - #### RX_CHAR_UUID

          public static final java.util.UUID RX_CHAR_UUID

    - #### TX_CHAR_UUID

          public static final java.util.UUID TX_CHAR_UUID

  - ### Constructor Detail

    - #### BTService

          public BTService()

  - ### Method Detail

    - #### onBind

          public IBinder onBind(Intent intent)

    - #### onUnbind

          public boolean onUnbind(Intent intent)

    - #### initialize

          public boolean initialize()

    - #### connect

          public boolean connect(java.lang.String address,
                                 RFIDWithUHFBluetooth.BTStatusCallback btStatusCallback)

    - #### disconnect

          public void disconnect()

    - #### close

          public void close()

    - #### readCharacteristic

          public boolean readCharacteristic(BluetoothGattCharacteristic characteristic)

    - #### enableTXNotification

          public void enableTXNotification()

    - #### writeRXCharacteristic

          public boolean writeRXCharacteristic(byte[] value)

    - #### getSupportedGattServices

          public java.util.List<BluetoothGattService> getSupportedGattServices()

    - #### startBTScan

          public void startBTScan(RFIDWithUHFBluetooth.ScanBTCallback scanBTCallback)

    - #### setKeyEventCallback

          public void setKeyEventCallback(RFIDWithUHFBluetooth.KeyEventCallback KeyEventCallback)

    - #### getBTConnectStatus

          public RFIDWithUHFBluetooth.StatusEnum getBTConnectStatus()

    - #### stoptBTScan

          public void stoptBTScan()