Code example for BluetoothSocket

Methods: isConnected

0
			} 
		} 
		 
		public boolean isConnected() { 
			try { 
				return this.clientSocket != null && this.clientSocket.isConnected();
			} catch (Exception e) {
				Log.e("BluetoothConnection.java", "Unable to determine the connection status", e);
				 
				return false; 
			} 
		} 
		 
		public boolean connectToDevice(BluetoothDevice device) {
			try { 
				UUID uuid = UUID.nameUUIDFromBytes(device.getAddress().getBytes());
				 
				this.clientSocket = device.createInsecureRfcommSocketToServiceRecord(uuid);
				this.clientSocket.connect();
				 
				if(isConnected()) {