Search code examples
androidbluetoothrfcomm

How to send 5 bytes with the same value from Android device via bluetooth


I have been using the Bluetooth chat example for transferring data over Bluetooth from my android device to another. I would like to know how to send 5 bytes with the value of: 0, 64, 0, 32, 152.


Solution

  • I believe I have solved my problem with this, and it works! thanks guys.

    public static byte[] reset(){
            byte[] values = new byte[]{0, 64, 0, 32, (byte) 152};
    
    
            return values;
        }