How to get the MAC address of an android device(WIFI is switched off) through code?
I need to design an Android app that should display the MAC address of the device.. I have already done the following coding.. WifiManager wifimanager = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiInfo winfo = wifimanager.getConnectionInfo(); String MACAddress = winfo.getMACAdress(); But the problem is, this code is working only when wifi is turned on, but my requirement is to find the MAC address whether wifi is turned on or not. Here is the code to getMac Address without using wifi manager. public static String getMACAddress(String interfaceName) { try { List<NetworkInterface>