|public class NetworkInfo
|NetworkInfo EventDispatcher Object
AIR profile support: This feature is supported
on all desktop operating systems and AIR for TV devices, but is not supported on all mobile devices.
You can test for support at run time using the
NetworkInfo.isSupported property. See
AIR Profile Support for more information regarding API support across multiple profiles.
The NetworkInfo object is a singleton. To get the single NetworkInfo object,
use the static
NetworkInfo.networkInfo property. Do not call the class
Most computers have one or more interfaces, such as a wired and a wireless network interface. Additional interfaces such as VPN, loopback, or virtual interfaces can also be present.
A NetworkInfo object dispatches a change event when the available
interfaces change. Call the
method to determine the most current network information.
Note: The NativeApplication object also dispatches network change events.
Related API Elements
|constructor : Object
A reference to the class object or constructor function for a given object instance.
| isSupported : Boolean
[static] [read-only] Indicates whether access to network interface information is supported on the client system.
| networkInfo : NetworkInfo
[static] [read-only] The singleton instance of the NetworkInfo object.
| permissionStatus : String
[static] [read-only] Determine whether the application has been granted the permission to access NetworkInfo.
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
Dispatches an event into the event flow.
Returns the list of network interfaces associated with this machine.
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
Indicates whether an object has a specified property defined.
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Indicates whether the specified property exists and is enumerable.
Removes a listener from the EventDispatcher object.
Sets the availability of a dynamic property for loop operations.
Returns the string representation of this object, formatted according to locale-specific conventions.
Returns the string representation of the specified object.
Returns the primitive value of the specified object.
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
|[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.
|[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.
|Dispatched when the network interfaces have changed.
The singleton instance of the NetworkInfo object.
public static function get networkInfo():NetworkInfo
SecurityError — If content running outside the AIR application security
sandbox accesses this property.
Determine whether the application has been granted the permission to access NetworkInfo.
public static function get permissionStatus():String
Related API Elements
property Event.type =
Dispatched when the network interfaces have changed.The
Event.NETWORK_CHANGE constant defines the value of the
type property of a
networkChange event object.
This event has the following properties:
false; there is no default behavior to cancel.
|The object that is actively processing the Event object with an event listener.
|The NativeApplication object.
Thu Dec 6 2018, 01:12 PM -08:00