title: Connect to specific Bluetooth device with a click
body: <p>I'm trying to connect to a specific device using my Android APP, until now what I was able to do is get the paired items doing this : </p>
  
  <pre><code>BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
  Set &lt; BluetoothDevice &gt; pairedDevices = bluetoothAdapter.getBondedDevices();
  if (pairedDevices.size() &gt; 0) {
      for (BluetoothDevice device: pairedDevices) {
          mDeviceName.add(device.getName());
          mDeviceMAC.add(device.getAddress());
  
      }
  }
  bluetoothClass.setDeviceName(mDeviceName);
  bluetoothClass.setDeviceMac(mDeviceMAC);
  </code></pre>
  
  <p>Where I get the <code>MAC</code> and the <code>Device name</code> of all of my paired devices. The thing that I would like to do is when I select one it connects to the <code>Bluetooth</code> device.</p>
  
  <h2>EXAMPLE</h2>
  
  <p>On a <code>Samsung S4</code> when I turn on the <code>Bluetooth</code> it popups a <code>Dialog</code> whitch contains all of my paired devices and when I click on anyone it connects (I've i'm able to ...) so basically I want to do this, since now I've been getting the paired devices (I don't know if it's the best way to get that but it does) and then when user click on anyone it connects to the device. </p>
  
  <p>It's something like this <a href="https://stackoverflow.com/questions/5171248/programmatically-connect-to-paired-bluetooth-device">question</a> but it's unfortunately unanswered.</p>