public boolean writeCharacteristic(String address,String serviceUUID,String characteristicUUID,String value){
  BluetoothGatt bluetoothGatt=mBluetoothGattMap.get(address);
  if (bluetoothGatt != null) {
    BluetoothGattService service=bluetoothGatt.getService(UUID.fromString(serviceUUID));
    BluetoothGattCharacteristic characteristic=service.getCharacteristic(UUID.fromString(characteristicUUID));
    characteristic.setValue(value);
    return bluetoothGatt.writeCharacteristic(characteristic);
  }
  return false;
}

public boolean writeCharacteristic ( String address , String serviceUUID , String characteristicUUID , String value ) { BluetoothGatt bluetoothGatt = mBluetoothGattMap . get ( address ) ; if ( bluetoothGatt != null ) { BluetoothGattService service = bluetoothGatt . getService ( UUID . fromString ( serviceUUID ) ) ; BluetoothGattCharacteristic characteristic = service . getCharacteristic ( UUID . fromString ( characteristicUUID ) ) ; characteristic . setValue ( value ) ; return bluetoothGatt . writeCharacteristic ( characteristic ) ; } return false ; }
write data to characteristic , and send to remote bluetooth le device .
