This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PCA10056/NRF52840 used android Blinky source code.

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.