Android developers looking to get the Wifi MAC Address on Android M may have experienced an issue where the standard Android OS API to get the MAC Address returns a fake MAC Address (02:00:00:00:00:00) instead of the real value.
The normal way to get the Wifi MAC address is below:
final WifiManager wifiManager = (WifiManager) getApplication().getApplicationContext().getSystemService(Context.WIFI_SERVICE);
final String wifiMACaddress = wifiManager.getConnectionInfo().getMacAddress();
No comments:
Post a Comment