title: How to obtain the bluetooth mac addres in android 8.1 and higher programmatically?
body: <p>We have an Android application where we need to establish a connection between 2 devices via Bluetooth programmatically. </p>
  
  <pre><code> String macAddress = android.provider.Settings.Secure.getString(getApplicationContext().getContentResolver(), "bluetooth_address");
  </code></pre>
  
  <p>However, the above code is not working anymore in Android Oreo and Pie.</p>
  
  <p>Does anybody have a workaround for this issue?</p>