Code example for BluetoothSocket

Methods: connect, getInputStream, getOutputStream

0
			Log.e(TAG, "create bluetooth socket: "+ e);
			throw new IOException("createRfcommSocket() failed");
		} 
 
		try { 
			mSock.connect();
			mIn = new BufferedReader(new InputStreamReader(mSock.getInputStream()), 128);
			mOut = mSock.getOutputStream();
			queue = new LinkedBlockingQueue<String>();
			start();
		} catch (IOException e) {
			Log.e(TAG, "connect() failed", e);
			mSock = null;
			throw e;
		} 
	} 
 
	public void close() { 
		if (D) Log.d(TAG, "" + System.currentTimeMillis() + " close()");
 
		if (mSock != null) {