app/src/main/java/com/example/multiprotocoldatatransfer/ConnectedThread.java
public void write(byte[] bytes) {
        try {
            mmOutStream.write(bytes);
            Log.e("Printing", "Sent: " + new String(bytes, 0, bytes.length));
        } catch (IOException e) {
            Log.e("Printing", "Error occurred when sending data", e);
        }
    }
// Call this from the main activity to send data to the remote device.
Call this from the main activity to send data to the remote device.
Call this from the main activity to send data to the remote device .
public void write(byte[] bytes) {
        try {
            mmOutStream.write(bytes);
            Log.e("Printing", "Sent: " + new String(bytes, 0, bytes.length));
        } catch (IOException e) {
            Log.e("Printing", "Error occurred when sending data", e);
        }
    }
public void write ( byte [ ] bytes ) { try { mmOutStream . write ( bytes ) ; Log . e ( "Printing" , "Sent: " + new String ( bytes , 0 , bytes . length ) ) ; } catch ( IOException e ) { Log . e ( "Printing" , "Error occurred when sending data" , e ) ; } }
Call this from the main activity to send data to the remote device.
Call this from the main activity to send data to the remote device .