Packagecom.wadedwalker.nativeExtension.telephone
Classpublic final class TelephoneManager
InheritanceTelephoneManager Inheritance flash.events.EventDispatcher

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

The TelephoneManager class is a Native Extension built to mimic many features of the TelephonyManager API of Android. One of the biggest features of this native extension is to be able to pause video/audio, games, programs, etc by knowing when a phone call happens. This will keep the phone call from fully interrupting your application and allow you to save the application state when a phone call occurs, and be able to restore the state when the user returns to the application.

Other features behind this extension let you retrieve lots of different information about the phone the application is running on.

NOTE: Many of the methods and events require the Android permission READ_PHONE_STATE.

View the examples



Public Properties
 PropertyDefined By
  AIR-only isSupported : Boolean
[static] [read-only] Deterimines whether or not this native extension is supported on the device the app is running on.
TelephoneManager
Public Methods
 MethodDefined By
  
Creates a TelephoneManager Native Extension object.
TelephoneManager
  
AIR-only dispose():void
Properly shut down this Native Extension.
TelephoneManager
  
AIR-only getCallState():int
Returns a constant indicating the call state (cellular) on the device.
TelephoneManager
  
Returns a constant indicating the type of activity on a data connection (cellular).
TelephoneManager
  
AIR-only getDataState():int
Returns a constant indicating the current data connection state (cellular).
TelephoneManager
  
AIR-only getDeviceId():String
Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones.
TelephoneManager
  
Returns the software version number for the device, for example, the IMEI/SV for GSM phones.
TelephoneManager
  
AIR-only getGroupIdLevel1():String
Returns the Group Identifier Level1 for a GSM phone.
TelephoneManager
  
AIR-only getMmsUAProfUrl():String
Returns the MMS user agent profile URL.
TelephoneManager
  
AIR-only getMmsUserAgent():String
Returns the MMS user agent.
TelephoneManager
  
Returns the ISO country code equivalent of the current registered operator's MCC (Mobile Country Code).
TelephoneManager
  
Returns the numeric name (MCC+MNC) of current registered operator.
TelephoneManager
  
Returns the alphabetic name of current registered operator.
TelephoneManager
  
Returns the NETWORK_TYPE_xxxx for current data connection.
TelephoneManager
  
Returns the number of phones available.
TelephoneManager
  
AIR-only getPhoneNumber():String
Returns the phone number for the device.
TelephoneManager
  
AIR-only getPhoneType():int
Returns a constant indicating the device phone type.
TelephoneManager
  
AIR-only getSimCountryIso():String
Returns the ISO country code equivalent for the SIM provider's country code.
TelephoneManager
  
AIR-only getSimOperator():String
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM.
TelephoneManager
  
Returns the Service Provider Name (SPN).
TelephoneManager
  
Returns the serial number of the SIM, if applicable.
TelephoneManager
  
AIR-only getSimState():int
Returns a constant indicating the state of the device SIM card.
TelephoneManager
  
AIR-only getSubscriberId():String
Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
TelephoneManager
  
Retrieves the alphabetic identifier associated with the voice mail number.
TelephoneManager
  
Returns the voice mail number.
TelephoneManager
  
Whether the phone supports hearing aid compatibility.
TelephoneManager
  
AIR-only isNetworkRoaming():Boolean
Returns true if the device is considered roaming on the current network, for GSM purposes.
TelephoneManager
  
AIR-only isSmsCapable():Boolean
Returns true if the current device supports sms service.
TelephoneManager
  
AIR-only isTtyModeSupported():Boolean
Whether the phone supports TTY mode.
TelephoneManager
  
AIR-only isWorldPhone():Boolean
Whether the device is a world phone.
TelephoneManager
Events
 Event Summary Defined By
  Dispatched when a call state change has occured on the phone.TelephoneManager
  This event gets dispatched when data activity has changed.TelephoneManager
  This event gets dispatched when data connection has changed.TelephoneManager
Public Constants
 ConstantDefined By
  AIR-only CALL_STATE_IDLE : int = 0x00000000
[static] Device call state: No activity.
TelephoneManager
  AIR-only CALL_STATE_OFFHOOK : int = 0x00000002
[static] Device call state: At least one call exists that is dialing, active, or on hold, and no calls are ringing or waiting.
TelephoneManager
  AIR-only CALL_STATE_RINGING : int = 0x00000001
[static] Device call state: Ringing.
TelephoneManager
  AIR-only DATA_ACTIVITY_DORMANT : int = 0x00000004
[static] Data connection is active, but physical link is down.
TelephoneManager
  AIR-only DATA_ACTIVITY_IN : int = 0x00000001
[static] Data connection activity: Currently receiving IP PPP traffic.
TelephoneManager
  AIR-only DATA_ACTIVITY_INOUT : int = 0x00000003
[static] Data connection activity: Currently both sending and receiving IP PPP traffic.
TelephoneManager
  AIR-only DATA_ACTIVITY_NONE : int = 0x00000000
[static] Data connection activity: No traffic.
TelephoneManager
  AIR-only DATA_ACTIVITY_OUT : int = 0x00000002
[static] Data connection activity: Currently sending IP PPP traffic.
TelephoneManager
  AIR-only DATA_CONNECTED : int = 0x00000002
[static] Data connection state: Connected.
TelephoneManager
  AIR-only DATA_CONNECTING : int = 0x00000001
[static] Data connection state: Currently setting up a data connection.
TelephoneManager
  AIR-only DATA_DISCONNECTED : int = 0x00000000
[static] Data connection state: Disconnected.
TelephoneManager
  AIR-only DATA_SUSPENDED : int = 0x00000003
[static] Data connection state: Suspended.
TelephoneManager
  AIR-only NETWORK_TYPE_1xRTT : int = 0x00000007
[static] Current network is 1xRTT.
TelephoneManager
  AIR-only NETWORK_TYPE_CDMA : int = 0x00000004
[static] Current network is CDMA.
TelephoneManager
  AIR-only NETWORK_TYPE_EDGE : int = 0x00000002
[static] Current network is EDGE.
TelephoneManager
  AIR-only NETWORK_TYPE_EHRPD : int = 0x0000000e
[static] Current network is eHRPD.
TelephoneManager
  AIR-only NETWORK_TYPE_EVDO_0 : int = 0x00000005
[static] Current network is EVDO revision 0.
TelephoneManager
  AIR-only NETWORK_TYPE_EVDO_A : int = 0x00000006
[static] Current network is EVDO revision A.
TelephoneManager
  AIR-only NETWORK_TYPE_EVDO_B : int = 0x0000000c
[static] Current network is EVDO revision B.
TelephoneManager
  AIR-only NETWORK_TYPE_GRPS : int = 0x00000001
[static] Current network is GRPS.
TelephoneManager
  AIR-only NETWORK_TYPE_HSDPA : int = 0x00000008
[static] Current network is HSDPA.
TelephoneManager
  AIR-only NETWORK_TYPE_HSPA : int = 0x0000000a
[static] Current network is HSPA.
TelephoneManager
  AIR-only NETWORK_TYPE_HSPAP : int = 0x0000000f
[static] Current network is HSPA+.
TelephoneManager
  AIR-only NETWORK_TYPE_HSUPA : int = 0x00000009
[static] Current network is HSUPA.
TelephoneManager
  AIR-only NETWORK_TYPE_IDEN : int = 0x0000000b
[static] Current network is iDen.
TelephoneManager
  AIR-only NETWORK_TYPE_LTE : int = 0x0000000d
[static] Current network is LTE.
TelephoneManager
  AIR-only NETWORK_TYPE_UMTS : int = 0x00000003
[static] Current network is UMTS.
TelephoneManager
  AIR-only NETWORK_TYPE_UNKNOWN : int = 0x00000000
[static] Current network is unknown.
TelephoneManager
  AIR-only PHONE_TYPE_CDMA : int = 0x00000002
[static] Phone radio is CDMA.
TelephoneManager
  AIR-only PHONE_TYPE_GSM : int = 0x00000001
[static] Phone radio is GSM.
TelephoneManager
  AIR-only PHONE_TYPE_NONE : int = 0x00000000
[static] No phone radio.
TelephoneManager
  AIR-only PHONE_TYPE_SIP : int = 0x00000003
[static] Phone is via SIP which is used in VoIP communication.
TelephoneManager
  AIR-only SIM_STATE_ABSENT : int = 0x00000001
[static] SIM card state: no SIM card is available in the device.
TelephoneManager
  AIR-only SIM_STATE_NETWORK_LOCKED : int = 0x00000004
[static] SIM card state: Locked: requries a network PIN to unlock.
TelephoneManager
  AIR-only SIM_STATE_PIN_REQUIRED : int = 0x00000002
[static] SIM card state: Locked: requires the user's SIM PIN to unlock.
TelephoneManager
  AIR-only SIM_STATE_PUK_REQUIRED : int = 0x00000003
[static] SIM card state: Locked: requires the user's SIM PUK to unlock.
TelephoneManager
  AIR-only SIM_STATE_READY : int = 0x00000005
[static] SIM card state: Ready.
TelephoneManager
  AIR-only SIM_STATE_UNKNOWN : int = 0x00000000
[static] SIM card state: Unknown.
TelephoneManager
Property Detail
AIR-only isSupportedproperty
isSupported:Boolean  [read-only]

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Deterimines whether or not this native extension is supported on the device the app is running on. This does not check for OS version to determine if specific methods that require newer OS versions are allowed to be used or not.


Implementation
    public static function get isSupported():Boolean
Constructor Detail
AIR-only TelephoneManager()Constructor
public function TelephoneManager()

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Creates a TelephoneManager Native Extension object.

Method Detail
AIR-only dispose()method
public final function dispose():void

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Properly shut down this Native Extension.

AIR-only getCallState()method 
public final function getCallState():int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns a constant indicating the call state (cellular) on the device. Possible values are: CALL_STATE_IDLE, CALL_STATE_RINGING, or CALL_STATE_OFFHOOK.

Returns
int

See also

AIR-only getDataActivity()method 
public final function getDataActivity():int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns a constant indicating the type of activity on a data connection (cellular).

Returns
int

See also

AIR-only getDataState()method 
public final function getDataState():int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns a constant indicating the current data connection state (cellular).

Returns
int

See also

AIR-only getDeviceId()method 
public final function getDeviceId():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones.

NOTE: Requires Android Permission: READ_PHONE_STATE

Returns
String
AIR-only getDeviceSoftwareVersion()method 
public final function getDeviceSoftwareVersion():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Returns null if the software version is not available.

NOTE: Requires Android Permission: READ_PHONE_STATE

Returns
String
AIR-only getGroupIdLevel1()method 
public final function getGroupIdLevel1():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the Group Identifier Level1 for a GSM phone. Returns null if it is unavailable.

NOTE: Requires Android Permission: READ_PHONE_STATE

NOTE: Requires API level 18 (Android 4.3.x Jelly Bean)

Returns
String
AIR-only getMmsUAProfUrl()method 
public final function getMmsUAProfUrl():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the MMS user agent profile URL.

NOTE: Requires API level 19 (Android 4.4.x KitKat)

Returns
String
AIR-only getMmsUserAgent()method 
public final function getMmsUserAgent():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the MMS user agent.

NOTE: Requires API level 19 (Android 4.4.x KitKat)

Returns
String
AIR-only getNetworkCountryIso()method 
public final function getNetworkCountryIso():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the ISO country code equivalent of the current registered operator's MCC (Mobile Country Code).

Availability: Only when user is registered to a network. Result may be unreliable on CDMA networks (use getPhoneType() to determine if on a CDMA network).

Returns
String

See also

AIR-only getNetworkOperator()method 
public final function getNetworkOperator():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the numeric name (MCC+MNC) of current registered operator.

Availability: Only when user is registered to a network. Result may be unreliable on CDMA networks (use getPhoneType() to determine if on a CDMA network).

Returns
String

See also

AIR-only getNetworkOperatorName()method 
public final function getNetworkOperatorName():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the alphabetic name of current registered operator.

Returns
String
AIR-only getNetworkType()method 
public final function getNetworkType():int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the NETWORK_TYPE_xxxx for current data connection. Use the TelephoneManager.NETWORK_TYPE_xxxx constants to check against.

Returns
int
AIR-only getPhoneCount()method 
public final function getPhoneCount():int

Language Version : ActionScript 3.0
Runtime Versions : AIR 20.0

Returns the number of phones available. Returns 1 for Single standby mode (Single SIM functionality) Returns 2 for Dual standby mode (Dual SIM functionality).

NOTE: Requires API level 23 (Android 6.0.x Marshmallow)

Returns
int
AIR-only getPhoneNumber()method 
public final function getPhoneNumber():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the phone number for the device.

NOTE: Requires Android Permission: READ_PHONE_STATE

Returns
String
AIR-only getPhoneType()method 
public final function getPhoneType():int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns a constant indicating the device phone type. This indicates the type of radio used to transmit voice calls.

Returns
int

See also

AIR-only getSimCountryIso()method 
public final function getSimCountryIso():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the ISO country code equivalent for the SIM provider's country code.

Returns
String
AIR-only getSimOperator()method 
public final function getSimOperator():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. 5 or 6 decimal digits.

Availability: SIM state must be SIM_STATE_READY

Returns
String

See also

AIR-only getSimOperatorName()method 
public final function getSimOperatorName():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the Service Provider Name (SPN).

Availability: SIM state must be SIM_STATE_READY

Returns
String

See also

AIR-only getSimSerialNumber()method 
public final function getSimSerialNumber():int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the serial number of the SIM, if applicable. Returns null if it is unavailable.

NOTE: Requires Android Permission: READ_PHONE_STATE.

Returns
int
AIR-only getSimState()method 
public final function getSimState():int

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns a constant indicating the state of the device SIM card.

Returns
int

See also

AIR-only getSubscriberId()method 
public final function getSubscriberId():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the unique subscriber ID, for example, the IMSI for a GSM phone. Returns null if it is unavailable.

NOTE: Requires Android Permission: READ_PHONE_STATE.

Returns
String
AIR-only getVoiceMailAlphaTag()method 
public final function getVoiceMailAlphaTag():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Retrieves the alphabetic identifier associated with the voice mail number.

NOTE: Requires Android Permission: READ_PHONE_STATE.

Returns
String
AIR-only getVoiceMailNumber()method 
public final function getVoiceMailNumber():String

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns the voice mail number. Returns null if it is unavailable.

NOTE: Requires Android Permission: READ_PHONE_STATE.

Returns
String
AIR-only isHearingAidCompatibilitySupported()method 
public final function isHearingAidCompatibilitySupported():Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 20.0

Whether the phone supports hearing aid compatibility.

NOTE: Requires API level 23 (Android 6.0.x Marshmallow)

Returns
Booleantrue if the device supports hearing aid compatibility, and false otherwise.
AIR-only isNetworkRoaming()method 
public final function isNetworkRoaming():Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Returns true if the device is considered roaming on the current network, for GSM purposes.

Availability: Only when user registered to a network.

Returns
Boolean
AIR-only isSmsCapable()method 
public final function isSmsCapable():Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 20.0

Returns true if the current device supports sms service.

If true, this means that the device supports both sending and receiving sms via the telephony network.

NOTE: Voicemail waiting sms, cell broadcasting sms, and MMS are disabled when device doesn't support sms.

NOTE: Requires API level 21 (Android 5.0.x Lollipop)

Returns
Boolean
AIR-only isTtyModeSupported()method 
public final function isTtyModeSupported():Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 20.0

Whether the phone supports TTY mode.

NOTE: Requires API level 23 (Android 6.0.x Marshmallow)

Returns
Booleantrue if the device supports TTY mode, and false otherwise.
AIR-only isWorldPhone()method 
public final function isWorldPhone():Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 20.0

Whether the device is a world phone.

NOTE: Requires API level 23 (Android 6.0.x Marshmallow)

Returns
Booleantrue if the device is a world phone, and false otherwise.
Event Detail
AIR-only callStateChange Event
Event Object Type: com.wadedwalker.nativeExtension.telephone.events.CallStateEvent

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Dispatched when a call state change has occured on the phone. The three states are: CALL_STATE_RINGING, CALL_STATE_IDLE, and CALL_STATE_OFFHOOK. When this event is dispatched, if the type is of CALL_STATE_RINGING then the phoneNumber property will be populated with the phone number if it can be retrieved.

NOTE: The phone number is not formatted.

NOTE: Requires Android Permission: READ_PHONE_STATE.

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

PropertyValue
callStateint value representing the current call state.
phoneNumberString value containing an unformatted phone number. null if the call state is not CALL_STATE_RINGING.

See also

AIR-only dataActivityChange Event  
Event Object Type: com.wadedwalker.nativeExtension.telephone.events.DataActivityEvent

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

This event gets dispatched when data activity has changed. This event will tell you what the current internet activity is.

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

PropertyValue
activityChangeint value representing the current activity state.

AIR-only dataConnectionStateChange Event  
Event Object Type: com.wadedwalker.nativeExtension.telephone.events.DataConnectionStateEvent

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

This event gets dispatched when data connection has changed.

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.

Constant Detail
AIR-only CALL_STATE_IDLEConstant
public static const CALL_STATE_IDLE:int = 0x00000000

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Device call state: No activity.

AIR-only CALL_STATE_OFFHOOKConstant 
public static const CALL_STATE_OFFHOOK:int = 0x00000002

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Device call state: At least one call exists that is dialing, active, or on hold, and no calls are ringing or waiting. If the user makes an outgoing call, it is possible for this event type to trigger during the ringing phase and offhook phase.

AIR-only CALL_STATE_RINGINGConstant 
public static const CALL_STATE_RINGING:int = 0x00000001

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Device call state: Ringing. A new call arrived and is ringing or waiting. In the latter case, another call is already active.

AIR-only DATA_ACTIVITY_DORMANTConstant 
public static const DATA_ACTIVITY_DORMANT:int = 0x00000004

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection is active, but physical link is down.

AIR-only DATA_ACTIVITY_INConstant 
public static const DATA_ACTIVITY_IN:int = 0x00000001

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection activity: Currently receiving IP PPP traffic.

AIR-only DATA_ACTIVITY_INOUTConstant 
public static const DATA_ACTIVITY_INOUT:int = 0x00000003

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection activity: Currently both sending and receiving IP PPP traffic.

AIR-only DATA_ACTIVITY_NONEConstant 
public static const DATA_ACTIVITY_NONE:int = 0x00000000

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection activity: No traffic.

AIR-only DATA_ACTIVITY_OUTConstant 
public static const DATA_ACTIVITY_OUT:int = 0x00000002

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection activity: Currently sending IP PPP traffic.

AIR-only DATA_CONNECTEDConstant 
public static const DATA_CONNECTED:int = 0x00000002

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection state: Connected. IP traffic should be available.

AIR-only DATA_CONNECTINGConstant 
public static const DATA_CONNECTING:int = 0x00000001

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection state: Currently setting up a data connection.

AIR-only DATA_DISCONNECTEDConstant 
public static const DATA_DISCONNECTED:int = 0x00000000

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection state: Disconnected. IP traffic not available.

AIR-only DATA_SUSPENDEDConstant 
public static const DATA_SUSPENDED:int = 0x00000003

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Data connection state: Suspended. The connection is up, but IP traffic is temporarily unavailable. For example, in a 2G network, data activity may be suspended when a voice call arrives.

AIR-only NETWORK_TYPE_1xRTTConstant 
public static const NETWORK_TYPE_1xRTT:int = 0x00000007

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is 1xRTT.

AIR-only NETWORK_TYPE_CDMAConstant 
public static const NETWORK_TYPE_CDMA:int = 0x00000004

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is CDMA.

AIR-only NETWORK_TYPE_EDGEConstant 
public static const NETWORK_TYPE_EDGE:int = 0x00000002

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is EDGE.

AIR-only NETWORK_TYPE_EHRPDConstant 
public static const NETWORK_TYPE_EHRPD:int = 0x0000000e

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is eHRPD.

AIR-only NETWORK_TYPE_EVDO_0Constant 
public static const NETWORK_TYPE_EVDO_0:int = 0x00000005

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is EVDO revision 0.

AIR-only NETWORK_TYPE_EVDO_AConstant 
public static const NETWORK_TYPE_EVDO_A:int = 0x00000006

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is EVDO revision A.

AIR-only NETWORK_TYPE_EVDO_BConstant 
public static const NETWORK_TYPE_EVDO_B:int = 0x0000000c

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is EVDO revision B.

AIR-only NETWORK_TYPE_GRPSConstant 
public static const NETWORK_TYPE_GRPS:int = 0x00000001

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is GRPS.

AIR-only NETWORK_TYPE_HSDPAConstant 
public static const NETWORK_TYPE_HSDPA:int = 0x00000008

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is HSDPA.

AIR-only NETWORK_TYPE_HSPAConstant 
public static const NETWORK_TYPE_HSPA:int = 0x0000000a

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is HSPA.

AIR-only NETWORK_TYPE_HSPAPConstant 
public static const NETWORK_TYPE_HSPAP:int = 0x0000000f

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is HSPA+.

AIR-only NETWORK_TYPE_HSUPAConstant 
public static const NETWORK_TYPE_HSUPA:int = 0x00000009

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is HSUPA.

AIR-only NETWORK_TYPE_IDENConstant 
public static const NETWORK_TYPE_IDEN:int = 0x0000000b

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is iDen.

AIR-only NETWORK_TYPE_LTEConstant 
public static const NETWORK_TYPE_LTE:int = 0x0000000d

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is LTE.

AIR-only NETWORK_TYPE_UMTSConstant 
public static const NETWORK_TYPE_UMTS:int = 0x00000003

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is UMTS.

AIR-only NETWORK_TYPE_UNKNOWNConstant 
public static const NETWORK_TYPE_UNKNOWN:int = 0x00000000

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Current network is unknown.

AIR-only PHONE_TYPE_CDMAConstant 
public static const PHONE_TYPE_CDMA:int = 0x00000002

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Phone radio is CDMA.

AIR-only PHONE_TYPE_GSMConstant 
public static const PHONE_TYPE_GSM:int = 0x00000001

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Phone radio is GSM.

AIR-only PHONE_TYPE_NONEConstant 
public static const PHONE_TYPE_NONE:int = 0x00000000

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

No phone radio.

AIR-only PHONE_TYPE_SIPConstant 
public static const PHONE_TYPE_SIP:int = 0x00000003

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

Phone is via SIP which is used in VoIP communication.

AIR-only SIM_STATE_ABSENTConstant 
public static const SIM_STATE_ABSENT:int = 0x00000001

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

SIM card state: no SIM card is available in the device.

AIR-only SIM_STATE_NETWORK_LOCKEDConstant 
public static const SIM_STATE_NETWORK_LOCKED:int = 0x00000004

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

SIM card state: Locked: requries a network PIN to unlock.

AIR-only SIM_STATE_PIN_REQUIREDConstant 
public static const SIM_STATE_PIN_REQUIRED:int = 0x00000002

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

SIM card state: Locked: requires the user's SIM PIN to unlock.

AIR-only SIM_STATE_PUK_REQUIREDConstant 
public static const SIM_STATE_PUK_REQUIRED:int = 0x00000003

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

SIM card state: Locked: requires the user's SIM PUK to unlock.

AIR-only SIM_STATE_READYConstant 
public static const SIM_STATE_READY:int = 0x00000005

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

SIM card state: Ready.

AIR-only SIM_STATE_UNKNOWNConstant 
public static const SIM_STATE_UNKNOWN:int = 0x00000000

Language Version : ActionScript 3.0
Runtime Versions : AIR 2.5

SIM card state: Unknown.

Examples

The following example shows how to listen for a telephone call.

NOTE: Requires Android Permission: READ_PHONE_STATE.

    package {
        
        import flash.display.Sprite;
        import com.wadedwalker.nativeExtension.telephone.TelephoneManager;
        import com.wadedwalker.nativeExtension.telephone.events.CallStateEvent;
        
        final public class MyAndroidApp extends Sprite {
            
            public var teleMan:TelephoneManager;
            
            final public function MyAndroidApp() {
                teleMan = new TelephoneManager();
                teleMan.addEventListener(CallStateEvent.CALL_STATE_CHANGE, onCallStateChange);
            }
            
            final public function onCallStateChange(e:CallStateChange):void {
                trace("Call state = " + e.callState);
                
                if (e.callState == TelephoneManager.CALL_STATE_RINGING) {
                    trace("Incoming phone number = " + e.phoneNumber);
                    // pause application and save all data
                }
                else if (e.callState == TelephoneManager.CALL_STATE_IDLE) {
                    // resume application
                }
            }
        }
    }