title: Getting MAC address in Android 6.0
body: <p>I'm developing an app that gets the MAC address of the device, but since Android 6.0 my code doesn't work, giving me an incorrect value.</p>
  
  <p>Here's my code...</p>
  
  <pre><code>public String ObtenMAC()
  {
      WifiManager manager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
      WifiInfo info = manager.getConnectionInfo();
  
      return(info.getMacAddress().toUpperCase());
  }
  </code></pre>
  
  <p>Instead of the real MAC address, it returns an strange code: <code>02:00:00:00:00:00</code>.</p>