Open vikrammani-t2s opened 2 years ago
when i try to connect the bluetooth socket , i was faced following issue
Attempt to invoke virtual method 'int java.io.InputStream.read(byte[], int, int)' on a null object reference
private static BluetoothSocket getSocket(BluetoothDevice device) throws IOException { BluetoothSocket socket; socket = device.createRfcommSocketToServiceRecord(PRINTER_UUID); socket.connect(); return socket; }
socket.connect(); is getting this kind of error
when i try to connect the bluetooth socket , i was faced following issue
Attempt to invoke virtual method 'int java.io.InputStream.read(byte[], int, int)' on a null object reference
private static BluetoothSocket getSocket(BluetoothDevice device) throws IOException { BluetoothSocket socket; socket = device.createRfcommSocketToServiceRecord(PRINTER_UUID); socket.connect(); return socket; }
socket.connect(); is getting this kind of error