If I want to send two byte, how can I do?
I use the https://github.com/NordicSemiconductor/Android-nRF-Blinky sample code.
In BlinkyManage.jave
public void send(final boolean onOff) {
// Are we connected?
if (mLedCharacteristic == null)
return;
final byte[] command = new byte[] {(byte) (onOff ? 1 : 0)};
log(LogContract.Log.Level.VERBOSE, "Turning LED " + (onOff ? "ON" : "OFF") + "...");
writeCharacteristic(mLedCharacteristic, command);
}
Just only send one byte.