I\'m using Android with Api level 8 and I want to get the Address of my Ethernet interface (eth0).
On API level 8, the NetworkInterface class don\'t have the function ge
Right now (March 2014) Google doesn't privides an API about Ethernet
This is the rason because we don't have a way to get the ethernet mac like in wifi case.
private String getWifiMACAddress(Context ctx) {
WifiManager wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifiManager.getConnectionInfo();
return info.getMacAddress();
}
One alternative is reading the eth0 file. Please let me know if anyone knows otherwise!