1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-11 07:38:29 +02:00
Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/btle/ReadAction.java
2015-04-19 11:28:03 +02:00

23 lines
640 B
Java

package nodomain.freeyourgadget.gadgetbridge.btle;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
/**
* Invokes a read operation on a given GATT characteristic.
* The result will be made available asynchronously through the
* {@link BluetoothGattCallback}
*/
public class ReadAction extends BtLEAction {
public ReadAction(BluetoothGattCharacteristic characteristic) {
super(characteristic);
}
@Override
public boolean run(BluetoothGatt gatt) {
return gatt.readCharacteristic(getCharacteristic());
}
}