Archive for April, 2012

Adobe AIR has a very good network API for detecting network info. Using the findInterfaces() method of NetworkInfo class, we can retrieve a list of all network interfaces on our computer or device. If we can explore these list then we can see which are active, what their IP and MAC addresses are, and even which IP protocol version they are using. It’s really a cool things Smile

The ActionScript library contains the NetworkInfo class. The NetworkInfo class provides the AIR application this public method and property:

  • public static function get networkInfo(): NetworkInfo
  • public function findInterfaces(): Vector.<NetworkInterface>

The NetworkInfo object is a singleton. The AIR application gets the single NetworkInfo object using the static networkInfo property.

If we are getting the network list using NetworkInfo.networkInfo.findInterfaces(); then we will see the all the network information in the list.


Note: The public functions and properties of the classes in the NetworkInfo extension—NetworkInfo, NetworkInterface, and InterfaceAddress—correspond with the public functions and properties in the existing ActionScript classes by the same name. See NetworkInfo, NetworkInterface, and InterfaceAddress in the ActionScript 3 Reference for the Adobe Flash Platform.