Android mac address

Quickly share your Android Code Snippets here...

Android mac address

Postby rosebeat » Wed Sep 22, 2010 9:47 am

WifiManager wifiMan = (WifiManager) this.getSystemService(
Context.WIFI_SERVICE);
WifiInfo wifiInf = wifiMan.getConnectionInfo();
String macAddr = wifiInf.getMacAddress();

I cannot get this code working. Any ideas if anyone has worked on this code? Please let me know.
Thanks
rosebeat
Junior Developer
Junior Developer
 
Posts: 15
Joined: Wed Sep 08, 2010 6:06 am

Top

Re: Android mac address

Postby rosebeat » Wed Sep 22, 2010 10:26 am

i have checked the wifi connectivity
Emulator was unable to start the wifi service
Since i am new to android, I dont know much about it. Is that the reason that the above code is not working?
rosebeat
Junior Developer
Junior Developer
 
Posts: 15
Joined: Wed Sep 08, 2010 6:06 am

Re: Android mac address

Postby jonbonazza » Mon Sep 27, 2010 7:06 pm

You need to enable the required supported features when creating the AVD.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 2 guests