List of usage examples for android.bluetooth BluetoothGatt GATT_SUCCESS
int GATT_SUCCESS
To view the source code for android.bluetooth BluetoothGatt GATT_SUCCESS.
Click Source Link
From source file:com.android.dragonkeyboardfirmwareupdater.KeyboardFirmwareUpdateService.java
private boolean checkOperationStatus(int status) { mGattOperationStatus = status;//from w ww . jav a2s . c o m if (mGattOperationStatus != BluetoothGatt.GATT_SUCCESS) { Log.d(TAG, "BluetoothGattCallback: GATT operation failure: " + mGattOperationStatus); return false; } return true; }
From source file:nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.MiBand2Support.java
private void handleBatteryInfo(byte[] value, int status) { if (status == BluetoothGatt.GATT_SUCCESS) { BatteryInfo info = new BatteryInfo(value); batteryCmd.level = ((short) info.getLevelInPercent()); batteryCmd.state = info.getState(); batteryCmd.lastChargeTime = info.getLastChargeTime(); batteryCmd.numCharges = info.getNumCharges(); handleGBDeviceEvent(batteryCmd); }/*from w ww .jav a 2s .c o m*/ }