Package | com.wadedwalker.nativeExtension.telephone.events |
Class | public final class CallStateEvent |
Inheritance | CallStateEvent ![]() |
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 2.5 |
The CallStateEvent
object is used for knowing 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.
See also
Property | Defined By | ||
---|---|---|---|
![]()
The call state of the phone. | CallStateEvent | ||
![]()
The incoming telephone number. | CallStateEvent |
Method | Defined By | ||
---|---|---|---|
![]()
Creates a CallStateEvent event.
| CallStateEvent | ||
![]() [override]
Duplicates an instance of a CallStateEvent class. | CallStateEvent | ||
![]() [override]
Returns a String containing all the properties of the event,
CallStateEvent. | CallStateEvent |
Constant | Defined By | ||
---|---|---|---|
![]() [static]
The CALL_STATE_CHANGE constant defines the value
of the type property of an callStateChange event object. | CallStateEvent |
![]() | property |
public var callState:int
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 2.5 |
The call state of the phone. This will be CALL_STATE_IDLE
,
CALL_STATE_RINGING
, or CALL_STATE_OFFHOOK
.
See also
![]() | property |
public var phoneNumber:String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 2.5 |
The incoming telephone number. This property will only be populated while the phone is ringing and will be unformatted.
![]() | () | Constructor |
public function CallStateEvent(type:String, callState:int, number:String = null, bubbles:Boolean = true, cancelable:Boolean = false)
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 2.5 |
Creates a CallStateEvent
event.
type:String | |
callState:int | |
number:String (default = null )
| |
bubbles:Boolean (default = true )
| |
cancelable:Boolean (default = false )
|
![]() | () | method |
override public final function clone():Event
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 2.5 |
Duplicates an instance of a CallStateEvent
class.
Returns a new CallStateEvent
object that is a copy of the original
instance of the CallStateEvent
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 CallStateEvent
object includes all the
properties of the original.
Event — A new CallStateEvent object that is identical to the original.
|
![]() | () | 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,
CallStateEvent
.
String — A string containing all the properties of the CallStateEvent object.
|
![]() | Constant |
public static const CALL_STATE_CHANGE:String = callStateChange
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 2.5 |
The CALL_STATE_CHANGE
constant defines the value
of the type property of an callStateChange
event object.
This event is dispatched when a call state change has occured on the phone.
NOTE: Requires Android Permission: READ_PHONE_STATE.
This event has the following properties in addition to standard event properties:
Property | Value |
---|---|
callState | int value representing the current call state. |
phoneNumber | String value containing an unformatted phone number.
null if the call state is not CALL_STATE_RINGING . |