Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the different Call states in the Android telephony stack represent?

The internal Android class com.android.internal.telephony.Call contains an enum called State and defined as follows:

public enum State {
    IDLE, ACTIVE, HOLDING, DIALING, ALERTING, INCOMING, WAITING, DISCONNECTED, DISCONNECTING;

    public boolean isAlive() {
        return !(this == IDLE || this == DISCONNECTED || this == DISCONNECTING);
    }

    public boolean isRinging() {
        return this == INCOMING || this == WAITING;
    }

    public boolean isDialing() {
        return this == DIALING || this == ALERTING;
    }
}

What does the different states represent?

like image 608
Bjarke Freund-Hansen Avatar asked Jun 09 '11 08:06

Bjarke Freund-Hansen


1 Answers

Okay, this is my own attempt at answering the question:

/** Call is idle. */
IDLE,
/** Call is active i.e. audio paths are connected. */
ACTIVE,
/** We have placed the call on hold. */
HOLDING,
/** Outgoing dialling call initiated. */
DIALING,
/** Outgoing call is alerting receiving party. */
ALERTING,
/** Incoming call ready for pickup. */ 
INCOMING,
/** Incoming call is waiting for pickup, while another call is in progress. */
WAITING,
/** Call is disconnected, by either party. */
DISCONNECTED,
/** Call is currently being disconnected. */
DISCONNECTING;
like image 192
Bjarke Freund-Hansen Avatar answered Oct 11 '22 10:10

Bjarke Freund-Hansen