title: how to get MAC Address of bluetooth connected device in android
body: <p>I am sending an image via bluetooth in android and want to fetch the MAC address of Device to which the image is being sent.</p>
  
  <p>Please find below my code.</p>
  
  <pre><code>private void bluetoothadd(){
      BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
      if (mBluetoothAdapter == null) {
          // Device does not support Bluetooth
  
          Log.e("Bluetooth ","not found");
      }
  
      if (!mBluetoothAdapter.isEnabled()) {
          Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
          startActivity(enableBtIntent);
  
          Set&lt;BluetoothDevice&gt; pairedDevices = mBluetoothAdapter.getBondedDevices();
          // If there are paired devices
          if (pairedDevices.size() &gt; 0) {
              // Loop through paired devices
              for (BluetoothDevice device : pairedDevices) {
  
  
                  Log.e("Mac Addressess","are:  "+mBluetoothAdapter.getRemoteDevice(device.getAddress()));
              }
              }
          }
  
  }
  </code></pre>
  
  <p>I am getting all paired device's MAC Address. I want the MAC Address of a device only to which data is being transmitted.</p>