public class MidasGattManager
extends android.bluetooth.BluetoothGattCallback
Modifier and Type | Field and Description |
---|---|
static java.util.UUID |
CHARACTERISTIC_ACCELEROMETER
가속도 센서
|
static java.util.UUID |
CHARACTERISTIC_PASSWORD_RESPONSE
패스워드 결과
|
static java.util.UUID |
DESCRIPTOR_ACCELEROMETER
가속도 센서 디스크립터
|
static java.util.UUID |
DESCRIPTOR_PASSWORD_RESPONSE
패스워드 결과 디스크립터
|
static java.util.UUID |
SERVICE_ACCELEROMETER
가속도 센서 서비스
|
static java.util.UUID |
SERVICE_PASSWORD
패스워드 서비스
|
Constructor and Description |
---|
MidasGattManager(android.content.Context context,
Beacon beacon) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
byteArrayToHex(byte[] bytes)
byte to string
|
boolean |
connect(MidasGattCallback callback) |
void |
disconnect() |
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) |
public static final java.util.UUID SERVICE_ACCELEROMETER
public static final java.util.UUID CHARACTERISTIC_ACCELEROMETER
public static final java.util.UUID DESCRIPTOR_ACCELEROMETER
public static final java.util.UUID SERVICE_PASSWORD
public static final java.util.UUID CHARACTERISTIC_PASSWORD_RESPONSE
public static final java.util.UUID DESCRIPTOR_PASSWORD_RESPONSE
public MidasGattManager(android.content.Context context, Beacon beacon)
public void disconnect()
public boolean connect(MidasGattCallback callback)
public void onConnectionStateChange(android.bluetooth.BluetoothGatt gatt, int status, int newState)
onConnectionStateChange
in class android.bluetooth.BluetoothGattCallback
public void onServicesDiscovered(android.bluetooth.BluetoothGatt gatt, int status)
onServicesDiscovered
in class android.bluetooth.BluetoothGattCallback
public void onCharacteristicChanged(android.bluetooth.BluetoothGatt gatt, android.bluetooth.BluetoothGattCharacteristic characteristic)
onCharacteristicChanged
in class android.bluetooth.BluetoothGattCallback
public void onCharacteristicRead(android.bluetooth.BluetoothGatt gatt, android.bluetooth.BluetoothGattCharacteristic characteristic, int status)
onCharacteristicRead
in class android.bluetooth.BluetoothGattCallback
public static java.lang.String byteArrayToHex(byte[] bytes)