Bluetooth connection failed in HTC incredable device android? -


i developing android application bluetooth connectivity. here used below code connect socket.

bluetoothsocket mmsocket = mmdevice.createrfcommsockettoservicerecord(my_uuid); 

this working fine devices not working htc devices. used code connecting socket htc device described below.

connection establishing fine time after time connection going lost.

method m = mmdevice.getclass().getmethod("createrfcommsocket", new class[] {int.class}); mmsocket = (bluetoothsocket) m.invoke(mmdevice, 1); 

this logcat while bluetooth connection lost

04-18 12:21:04.962: e/bb_logs(4285): disconnected 04-18 12:21:04.962: e/bb_logs(4285): java.io.ioexception: software caused connection abort 04-18 12:21:04.962: e/bb_logs(4285):    @ android.bluetooth.bluetoothsocket.readnative(native method) 04-18 12:21:04.962: e/bb_logs(4285):    @ android.bluetooth.bluetoothsocket.read(bluetoothsocket.java:333) 04-18 12:21:04.962: e/bb_logs(4285):    @ android.bluetooth.bluetoothinputstream.read(bluetoothinputstream.java:96) 04-18 12:21:04.962: e/bb_logs(4285):    @ java.io.inputstream.read(inputstream.java:163) 04-18 12:21:04.962: e/bb_logs(4285):    @ com.fitness.bluetoothservice$connectedthread.run(bluetoothservice.java:592) 

please advice me working procedure connection bluetooth code htc devices


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -