8

Possible Duplicate:
Official reasons for “Software caused connection abort: socket write error”

I have problems with BluetoothChat I can't connect Droid . I always get this IOException

08-09 20:58:24.889: INFO/BluetoothChat(17378): MESSAGE_STATE_CHANGE: 3
08-09 20:58:51.053: DEBUG/BluetoothService(17378): BT_SEND_MESSAGE
08-09 20:58:51.108: ERROR/BluetoothService(17378): disconnected
08-09 20:58:51.108: ERROR/BluetoothService(17378): java.io.IOException: Software caused connection    abort
08-09 20:58:51.108: ERROR/BluetoothService(17378):     at android.bluetooth.BluetoothSocket.readNative (Native Method)
08-09 20:58:51.108: ERROR/BluetoothService(17378):     at android.bluetooth.BluetoothSocket.read(BluetoothSocket.java:286)
08-09 20:58:51.108: ERROR/BluetoothService(17378):     at android.bluetooth.BluetoothInputStream.read(BluetoothInputStream.java:96)
08-09 20:58:51.108: ERROR/BluetoothService(17378):     at java.io.InputStream.read(InputStream.java:133)
08-09 20:58:51.108: ERROR/BluetoothService(17378):     at my.test.BluetoothChatService$ConnectedThread.run(BluetoothChatService.java:356)

How can I solve this problem?

Community
  • 1
  • 1
vic
  • 159
  • 1
  • 7
  • 1
    Are you using the code exactly if not show some code. And also register as a user and accept some answers 0% acceptance doesn't make us want to help you that much – JPM Nov 02 '11 at 14:54

1 Answers1

-2
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"></uses-permission>

add these permissions.

Flexo
  • 87,323
  • 22
  • 191
  • 272
RamRoyal
  • 40
  • 3
  • 3
    You could have edited your previous answer instead of deleting it and adding another one. This answer would be better if you added some more text to explain what the problem is and why this fixes it. – Flexo Dec 06 '11 at 13:12