Good day.
I was able to create a stable connection to the BT device.
To do this, I changed your code:
BluetoothSocket btsocket =
btdev.createRfcommSocketToServiceRecord(uuid);
btsocket.connect();

Upon:
int RFCOMM_CHANEL = 1; //SPP chanel
Method m = btdev.getClass().getMethod("createRfcommSocket", new
Class[] { int.class });
BluetoothSocket connection = (BluetoothSocket) m.invoke(btdev,
RFCOMM_CHANEL);
connection.connect();

And now the connection has been stable and not broken and you can read
and receive data by input and output streams.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to