Getting Ethernet Adapter(MAC Address in AIR Applicaion)
Posted by shardulbartwal on October 3, 2010
Its very simple and easy to get the MAC address of any computer with Adobe AIR application.
With just two to three lines you can find it very easily.Just have a look at lines below
and you will get the MAC address of the computer in which your application is running.
var networkInterface : Object = NetworkInfo.networkInfo.findInterfaces();
var networkInfo : Object = networkInterface[0];
var physicalAddress : String = networkInfo.hardwareAddress.toString();
Hope you will like it…………
Enjoy Flexing…….













thunder said
nice thanks,
btw it is spelled ethernet not eathernet
shardulbartwal said
Thnx man,
Done………
AlphaBlack said
can you put an example please.i’m new in flex and adobe air and i want to understand how these works. thanks
Brady White said
Thanks for the brief intro. I also found this article that is more detailed:
http://www.adobe.com/devnet/air/flex/articles/retrieving_network_interfaces.html
Josh said
You will get the address of the first interface that is found. It probably won’t be for the Ethernet adapter.
See the link posted by Bradley White above
vkwave said
Perfect. Thanks for sharing
Prashant. said
Hi,
On windows machine It works perfectly, but on MAC OS (Version 10.6.2) I am getting empty string.
Please can anyone help me to get MAC address on windows as well as MAC os.
Thanks in advanced.