title: Android bluetooth get device name
body: <p>I have multiple Bluetooth devices from a vendor. When I paired my device it takes the same friendly name say <code>"BTDevice"</code>. Now when i pair all multiple devices I get the same name. in my <code>ListView</code>. I cannot show the the address of the device  in my List.I tried renaming the friendly name in Bluetooth settings but it still shows me "BTDevice" as device name when I do <code>device.getName()</code> any suggestions to overcome this issue. </p>
  
  <p>Here is the code.</p>
  
  <pre><code>private void getDevice(){
  ArrayList&lt;String&gt; bondedAdapter = new ArrayList&lt;String&gt;();
   try {
         BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
         Set&lt;BluetoothDevice&gt; bondedSet =   bluetoothAdapter.getBondedDevices();          
         int count = 0;
         if(bondedSet.size() &gt; 0){
            for(BluetoothDevice device : bondedSet){          
            bondedAdapter.add(device.getName()+"\n"+device.getAddress());     
            Log.i("TabInflater", device.getName());
         }
         }else{
          bondedAdapter.add("No Devices");
         }
       } catch (Exception e) {
        Log.e("TabInflater","Error");
       }
  }
  </code></pre>
  
  <p>In my log it says I have paired to (Addresses hidden intentionally)</p>
  
  <pre><code>BTDevice
  BTDevice
  BTDevice
  </code></pre>