The outPutStream
object gives me error,
W / System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.OutputStream.close ()' on a null object reference.
is when I try to send the data
try {
mmOutputStream.write(msg.getBytes());
bluetooth.setText("Data Sent");
} catch (NullPointerException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}