/* 停止客户端连接 */
private void shutdownClient() {
new Thread() {
public void run() {
if (clientConnectThread != null) {
clientConnectThread.interrupt();
Log.i("1111111111111111111111111111111",
"5555555555555555555555555555555555");
clientConnectThread = null;
}
if (mreadThread != null) {
mreadThread.interrupt();
Log.i("1111111111111111111111111111111",
"44444444444444444444444444444");
mreadThread = null;
}
if (socket != null) {
try {
socket.close(); Log.i("1111111111111111111111111111111",
"3333333333333333333333333");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
socket = null;
}
};
}.start();
}Android的BluetoothSocket调用Close时程序崩溃
原文:http://www.cnblogs.com/meizhenfen42/p/4027531.html