Code example for BluetoothSocket

Methods: close, connect, isConnected

0
            */ 
			BluetoothSocket tmp = null; 
			tmp = myDevice.createInsecureRfcommSocketToServiceRecord(MY_UUID);
			sock_client = tmp;
			//Parcel testinguuid = myDevice.g 
			sock_client.connect();
			 
			//in = sock_client.getInputStream(); 
			//out = sock_client.getOutputStream(); 
			//Log.d("StayConnected_01","Connectie streams \n"); 
			 
		} catch (IOException e) {
			// TODO Auto-generated catch block 
			Log.d("Debug",e.getMessage());
			try { 
				sock_client.close();
			} catch (IOException e1) {
				// TODO Auto-generated catch block 
				e1.printStackTrace();
			} 
			 
		} 
		if(sock_client.isConnected()){
			Log.d("Debug","Device is connected.\n");
	    } 
		 
	} 
	@Override