public class GattCallback
extends android.bluetooth.BluetoothGattCallback
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
C5_OPENXC_BLE_CHARACTERISTIC_NOTIFY_UUID |
static java.lang.String |
C5_OPENXC_BLE_CHARACTERISTIC_WRITE_UUID |
static java.lang.String |
C5_OPENXC_BLE_DESCRIPTOR_NOTIFY_UUID |
static java.lang.String |
C5_OPENXC_BLE_SERVICE_UUID |
Constructor and Description |
---|
GattCallback() |
Modifier and Type | Method and Description |
---|---|
boolean |
isConnected() |
boolean |
isDisconnected() |
void |
onCharacteristicChanged(android.bluetooth.BluetoothGatt gatt,
android.bluetooth.BluetoothGattCharacteristic characteristic) |
void |
onCharacteristicRead(android.bluetooth.BluetoothGatt gatt,
android.bluetooth.BluetoothGattCharacteristic characteristic,
int status) |
void |
onConnectionStateChange(android.bluetooth.BluetoothGatt gatt,
int status,
int newState) |
void |
onServicesDiscovered(android.bluetooth.BluetoothGatt gatt,
int status) |
void |
readChangedCharacteristic(android.bluetooth.BluetoothGattCharacteristic characteristic) |
void |
setBluetoothGatt(android.bluetooth.BluetoothGatt mBluetoothGatt) |
void |
setConnected(boolean connected) |
void |
setDisconnected(boolean disconnected) |
public static final java.lang.String C5_OPENXC_BLE_SERVICE_UUID
public static final java.lang.String C5_OPENXC_BLE_CHARACTERISTIC_NOTIFY_UUID
public static final java.lang.String C5_OPENXC_BLE_DESCRIPTOR_NOTIFY_UUID
public static final java.lang.String C5_OPENXC_BLE_CHARACTERISTIC_WRITE_UUID
public void setBluetoothGatt(android.bluetooth.BluetoothGatt mBluetoothGatt)
public void onConnectionStateChange(android.bluetooth.BluetoothGatt gatt, int status, int newState)
onConnectionStateChange
in class android.bluetooth.BluetoothGattCallback
public boolean isConnected()
public void onCharacteristicRead(android.bluetooth.BluetoothGatt gatt, android.bluetooth.BluetoothGattCharacteristic characteristic, int status)
onCharacteristicRead
in class android.bluetooth.BluetoothGattCallback
public void setConnected(boolean connected)
public boolean isDisconnected()
public void setDisconnected(boolean disconnected)
public void onCharacteristicChanged(android.bluetooth.BluetoothGatt gatt, android.bluetooth.BluetoothGattCharacteristic characteristic)
onCharacteristicChanged
in class android.bluetooth.BluetoothGattCallback
public void readChangedCharacteristic(android.bluetooth.BluetoothGattCharacteristic characteristic)
public void onServicesDiscovered(android.bluetooth.BluetoothGatt gatt, int status)
onServicesDiscovered
in class android.bluetooth.BluetoothGattCallback