• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps IOException: read failed, socket might closed - Bluetooth Android 5.1.1

I am making a Bluetooth Connection to Raspberry Pi from my Android LG-G2 running Lollipop 5.1.1 I've tried Java Reflection Function

Method m = btDevice.getClass().getMethod("createInsecureRfcommSocket",newClass[]{int.class});
tmp =(BluetoothSocket) m.invoke(btDevice,1);

For both, secure and insecure. As well as Java API provided function

tmp = btDevice.createInsecureRfcommSocketToServiceRecord(myUUID);

Both, secure and insecure. I have searched for days but couldn't find any working solution. Any help?
 
Back
Top Bottom