Hi all,
I have encountered a problem when I am doing Bluetooth programming on
Android 2.1.
I call BluetoothServerSocket.accept() in a Thread for accepting income
connection and it works fine on accepting incoming connections,
but the problem is that I have no way to stop the thread when I want
to quit the app.
I have tried calling BluetoothServerSocket.close() but it says:
03-28 01:55:28.298: ERROR/BluetoothSppPort(912): invalid port
state for disconnection
Also, I have tried using Thread.interrupt() but it has no effect on
it.
Are there any ways to force close the socket or stop the thread?
Do I need to switch off the bluetooth?
Thank you.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
To unsubscribe from this group, send email to
android-developers+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.