Packagecom.wadedwalker.nativeExtension.telephone.events
Classpublic final class DataConnectionStateEvent
InheritanceDataConnectionStateEvent Inheritance flash.events.Event

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

The DataConnectionStateEvent object is used for knowing when changes to the data connection state (cellular) have occured. The properties of the DataConnectionStateEvent class carry basic information about the event that was dispatched. In the case of a dataConnectionStateChange event, the two main properties to look at are the connectionState and networkType.



Public Properties
 PropertyDefined By
  AIR-only connectionState : int
The connection state change.
DataConnectionStateEvent
  AIR-only networkType : int
The type of network the device is on.
DataConnectionStateEvent
Public Methods
 MethodDefined By
  
AIR-only DataConnectionStateEvent(type:String, connectionState:int, networkType:int, bubbles:Boolean = true, cancelable:Boolean = false)
Creates a DataConnectionStateEvent event.
DataConnectionStateEvent
  
AIR-only clone():Event
[override] Duplicates an instance of a DataConnectionStateEvent class.
DataConnectionStateEvent
  
AIR-only toString():String
[override] Returns a String containing all the properties of the event, DataConnectionStateEvent.
DataConnectionStateEvent
Public Constants
 ConstantDefined By
  AIR-only DATA_CONNECTION_STATE_CHANGE : String = dataConnectionStateChange
[static] The DATA_CONNECTION_STATE_CHANGE constant defines the value of the type property of an DataConnectionconnectionStated event object.
DataConnectionStateEvent
Property Detail
AIR-only connectionStateproperty
public var connectionState:int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

The connection state change. Possible values are DATA_CONNECTED, DATA_DISCONNECTED, DATA_CONNECTING, and DATA_SUSPENDED.

See also

AIR-only networkTypeproperty 
public var networkType:int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

The type of network the device is on. An example value this could be is NETWORK_TYPE_LTE. You can use this property to know if a users mobile internet connection will suffice for an apps need. Use the NETWORK_TYPE_XXXX constants of the TelephoneManager to check this property against.

See also

Constructor Detail
AIR-only DataConnectionStateEvent()Constructor
public function DataConnectionStateEvent(type:String, connectionState:int, networkType:int, bubbles:Boolean = true, cancelable:Boolean = false)

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Creates a DataConnectionStateEvent event.

Parameters
type:String
 
connectionState:int
 
networkType:int
 
bubbles:Boolean (default = true)
 
cancelable:Boolean (default = false)
Method Detail
AIR-only clone()method
override public final function clone():Event

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Duplicates an instance of a DataConnectionStateEvent class.

Returns a new DataConnectionStateEvent object that is a copy of the original instance of the DataConnectionStateEvent object. You do not normally call clone(); the EventDispatcher class calls it automatically when you redispatch an event—that is, when you call dispatchEvent(event) from a handler that is handling event.

The new DataConnectionStateEvent object includes all the properties of the original.

Returns
Event — A new DataConnectionStateEvent object that is identical to the original.
AIR-only toString()method 
override public final function toString():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns a String containing all the properties of the event, DataConnectionStateEvent.

Returns
String — A string containing all the properties of the DataConnectionStateEvent object.
Constant Detail
AIR-only DATA_CONNECTION_STATE_CHANGEConstant
public static const DATA_CONNECTION_STATE_CHANGE:String = dataConnectionStateChange

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

The DATA_CONNECTION_STATE_CHANGE constant defines the value of the type property of an DataConnectionconnectionStated event object.

This event has the following properties in addition to standard event properties:

PropertyValue
connectionStateint value representing the connection state.
networkTypeString value represnting the type of network the device is on.