@@ -0,0 +1,1298 @@
+package com.uxxu.konashi.lib.action;%0A%0Aimport android.bluetooth.BluetoothGattCharacteristic;%0Aimport android.bluetooth.BluetoothGattService;%0A%0Aimport java.util.UUID;%0A%0Aimport info.izumin.android.bletia.BleErrorType;%0Aimport info.izumin.android.bletia.BletiaException;%0Aimport info.izumin.android.bletia.action.WriteCharacteristicAction;%0Aimport info.izumin.android.bletia.wrapper.BluetoothGattWrapper;%0A%0A/**%0A * Created by izumin on 9/17/15.%0A */%0Apublic abstract class KonashiWriteCharacteristicAction extends WriteCharacteristicAction %7B%0A%0A    protected KonashiWriteCharacteristicAction(BluetoothGattCharacteristic characteristic) %7B%0A        super(characteristic);%0A    %7D%0A%0A    protected KonashiWriteCharacteristicAction(BluetoothGattService service, UUID uuid) %7B%0A        this(service.getCharacteristic(uuid));%0A    %7D%0A%0A    @Override%0A    public void execute(BluetoothGattWrapper gattWrapper) %7B%0A        if (hasValidParams()) %7B%0A            setValue();%0A            super.execute(gattWrapper);%0A        %7D else %7B%0A            rejectIfParamsAreInvalid();%0A        %7D%0A    %7D%0A%0A    protected void rejectIfParamsAreInvalid() %7B%0A        getDeferred().reject(new BletiaException(BleErrorType.INVALID_PARAMETER, getCharacteristic()));%0A    %7D%0A%0A    protected abstract void setValue();%0A    protected abstract boolean hasValidParams();%0A%7D%0A

Add KonashiWriteCharacteristicAction