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 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
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
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 )
|
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.
|
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.
|
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:
Property | Value |
---|
connectionState | int value representing the connection state. |
networkType | String value represnting the type of network the device is on. |
Fri Jan 1 2016, 01:33 PM -05:00