List of usage examples for android.bluetooth BluetoothGattCharacteristic setValue
public boolean setValue(String value)
From source file:com.mbientlab.metawear.api.MetaWearBleService.java
/** * Writes a command to MetaWear via the command register UUID * @see Characteristics.MetaWear#COMMAND *//*from w ww.ja v a2 s .c o m*/ private void writeCommand(final MetaWearState mwState) { gattActions.add(new GattAction() { @Override public void execAction() { byte[] next = mwState.commandBytes.poll(); if (next != null && mwState.mwGatt != null) { BluetoothGattService service = mwState.mwGatt.getService(GATTService.METAWEAR.uuid()); BluetoothGattCharacteristic command = service.getCharacteristic(MetaWear.COMMAND.uuid()); command.setValue(next); mwState.mwGatt.writeCharacteristic(command); } else { execGattAction(); } } }); }