Android 2.1 How to disconnect a connected bt device
<p>I have referenced the link:
<a href="http://stackoverflow.com/questions/3031796/disconnect-a-bluetooth-socket-in-android">Disconnect a bluetooth socket in Android</a></p>

<p>but still it doesn't work for me. always through an exception at BluetoothSocket::connect()</p>

<p>My case is that if User has paired and connected a remote bt device via the phone, how can I programmatically disconnect it??</p>

<p>I got a hunch that if I want the connection to be disconnected I should close the input, output stream then perform BluetoothSocket close. And I can't find anywhere to get the socket on the connected device. the API createRfcommSocketToServiceRecord is to create a socket. Thank you!</p>

<p>PS, the remote bt device is headset</p>
