BluetoothAdapter.getDefaultAdapter().cancelDiscovery();
BluetoothDevice mDevice = mBluetoothAdapter
.getRemoteDevice(strAddress);
mSocket = mDevice
.createRfcommSocketToServiceRecord(MY_UUID);
mSocket.connect();
mInputStream = mSocket.getInputStream();
mOutputStream = mSocket.getOutputStream();
isConnected = true;// 讲蓝牙连接状态设置为true
//想连接成功的蓝牙发送一组数据
# mOutputStream.write(Global.connectSymbol, 0,
# Global.connectSymbol.length);
//上面这一句抛出异常,只有在小米手机上面才出现!
//e=IOException
//detailMessage=[JSR82] write :write() failed:
//stackState
//stacktrace=null
suppressedExceptions=Collections$EmptyList