Call

data class Call(    val id: CallId,     val state: CallState,     val creationTime: Instant,     val activationTime: Instant?,     val phoneNumber: String,     val displayName: String,     val canChangeHoldState: Boolean,     val disconnectedCause: DisconnectCause?) : Parcelable

Represents a phone call.

Constructors

Link copied to clipboard
fun Call(    id: CallId,     state: CallState,     creationTime: Instant,     activationTime: Instant?,     phoneNumber: String,     displayName: String,     canChangeHoldState: Boolean,     disconnectedCause: DisconnectCause?)

Properties

Link copied to clipboard
val activationTime: Instant?

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

Link copied to clipboard
val canChangeHoldState: Boolean

Indicates whether this call currently can be put on hold or resumed.

Link copied to clipboard
val creationTime: Instant

An Instant object representing the time the call was created.

Link copied to clipboard
val disconnectedCause: DisconnectCause?

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
val displayName: String

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
val phoneNumber: String

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

Link copied to clipboard
val state: CallState

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)