Back to project page LeBlue.
The source code is released under:
Apache License
If you think the Android project LeBlue listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package houtbecke.rs.le.fourdotthree; /*from www . j a v a 2 s. com*/ import android.bluetooth.BluetoothGatt; import android.bluetooth.BluetoothGattCharacteristic; import houtbecke.rs.le.LeFormat; import houtbecke.rs.le.LeGattCharacteristic; class LeGattCharacteristic43 implements LeGattCharacteristic { final BluetoothGattCharacteristic characteristic; final BluetoothGatt gatt; LeGattCharacteristic43(BluetoothGatt gatt,BluetoothGattCharacteristic characteristic) { this.characteristic = characteristic; this.gatt = gatt; } @Override public byte[] getValue() { return characteristic.getValue(); } @Override public int getIntValue(LeFormat format, int index) { return characteristic.getIntValue(format.format(), index); } @Override public void setValue(byte[] value) { characteristic.setValue(value); gatt.writeCharacteristic(characteristic); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || !(o instanceof LeGattCharacteristic43)) return false; return ((LeGattCharacteristic43) o).characteristic.getUuid().equals(characteristic.getUuid()); } }