Call

data class Call(val id: CallId, val state: CallState, val capabilities: EnumSet<CallCapability>, val creationTime: Instant, val activationTime: Instant?, val phoneNumber: String, val displayName: String, val disconnectedCause: DisconnectCause?, val phoneAccountId: String) : Parcelable

Represents a phone call.

Constructors

Link copied to clipboard
fun Call(id: CallId, state: CallState, capabilities: EnumSet<CallCapability>, creationTime: Instant, activationTime: Instant?, phoneNumber: String, displayName: String, disconnectedCause: DisconnectCause?, phoneAccountId: String)

Properties

Link copied to clipboard

An Instant object representing the time the call was first made CallState.ACTIVE.

Link copied to clipboard

Describes operations that can be performed on the call.

Link copied to clipboard

An Instant object representing the time the call was created.

Link copied to clipboard

Indicates the reason the call is in the CallState.DISCONNECTED state. It is null if the call is not in that state.

Link copied to clipboard

The name to display for the caller. Will be empty if unavailable.

Link copied to clipboard
val id: CallId

The identifier that uniquely identifies a call.

Link copied to clipboard

The id of the phone account from which this call originates. It corresponds to the ID returned by the PhoneAccountHandle#getId() Android Telecom API.

Link copied to clipboard

Phone number of the call in the format provided by Android.

Link copied to clipboard

The state of the call.

Functions

Link copied to clipboard
open override fun toString(): String

phoneNumber and displayName are masked when the Call is printed.

Link copied to clipboard
fun withState(value: CallState): Call

Provides a new instance of the call with the new CallState defined in value.

fun withState(callState: CallState, disconnectCause: DisconnectCause?): Call

Provides a new instance of the call with the new CallState defined in callState including the DisconnectCause defined in disconnectCause.

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Extensions

Link copied to clipboard
Link copied to clipboard

Indicates if a Call has the capability to be put on hold, which happens when the Call.capabilities have the CallCapability.HOLD.

Link copied to clipboard

Indicates if a Call can be hanged up, which happens when the Call is in the CallState.ACTIVE, CallState.DIALING, CallState.CONNECTING, CallState.ANSWERING or CallState.HOLDING state.

Link copied to clipboard

Indicates if a Call can be muted, which happens when the Call is in the CallState.ACTIVE or CallState.HOLDING state.

Link copied to clipboard

Indicates if a Call has the capability to be muted, which happens when the Call.capabilities have the CallCapability.MUTE.

Link copied to clipboard

Indicates if a Call is in progress, which happens when the Call either isOngoing or isOnHold.

Link copied to clipboard

Indicates if a Call is currently ongoing, which happens when the Call is in the CallState.ACTIVE, CallState.DIALING, CallState.CONNECTING or CallState.ANSWERING state.

Link copied to clipboard

Indicates if a Call is currently on hold, which happens when the Call is in the CallState.HOLDING state.

Link copied to clipboard

Indicates if a Call is currently ringing, which happens when the Call is in the CallState.RINGING state.