How can I obtain the MAC and IP addresses of the device from an Android application?
Asked
Active
Viewed 2,257 times
1 Answers
3
public static String getMacAddr(Context appContext) {
WifiManager manager=(WifiManager) appContext.getSystemService(Context.WIFI_SERVICE);
WifiInfo info=manager.getConnectionInfo();
String m_macAddr=info.getMacAddress();
return m_macAddr;
}
- Try this.

kks
- 342
- 5
- 25