Added in API level 34

CallEventCallback


interface CallEventCallback
android.telecom.CallEventCallback

CallEventCallback relays call updates (that do not require any action) from the Telecom framework out to the application. This can include operations which the app must implement on a Call due to the presence of other calls on the device, requests relayed from a Bluetooth device, or from another calling surface.

Summary

Public methods
abstract Unit

Telecom is informing the client that the available CallEndpoints have changed.

abstract Unit

Telecom is informing the client the current CallEndpoint changed.

abstract Unit

Telecom is informing the client user requested call streaming but the stream can't be started.

abstract Unit
onEvent(event: String, extras: Bundle)

Informs this android.telecom.CallEventCallback on events raised from a android.telecom.InCallService presenting this call.

abstract Unit

Called when the mute state changes.

Public methods

onAvailableCallEndpointsChanged

Added in API level 34
abstract fun onAvailableCallEndpointsChanged(availableEndpoints: MutableList<CallEndpoint!>): Unit

Telecom is informing the client that the available CallEndpoints have changed.

Parameters
availableEndpoints MutableList<CallEndpoint!>: The set of available CallEndpoints reported by Telecom. This value cannot be null.

onCallEndpointChanged

Added in API level 34
abstract fun onCallEndpointChanged(newCallEndpoint: CallEndpoint): Unit

Telecom is informing the client the current CallEndpoint changed.

Parameters
newCallEndpoint CallEndpoint: The new CallEndpoint through which call media flows (i.e. speaker, bluetooth, etc.). This value cannot be null.

onCallStreamingFailed

Added in API level 34
abstract fun onCallStreamingFailed(reason: Int): Unit

Telecom is informing the client user requested call streaming but the stream can't be started.

Parameters
reason Int: Code to indicate the reason of this failure Value is android.telecom.CallStreamingService.STREAMING_FAILED_UNKNOWN, android.telecom.CallStreamingService.STREAMING_FAILED_ALREADY_STREAMING, android.telecom.CallStreamingService.STREAMING_FAILED_NO_SENDER, or android.telecom.CallStreamingService.STREAMING_FAILED_SENDER_BINDING_ERROR

onEvent

Added in API level 34
abstract fun onEvent(
    event: String,
    extras: Bundle
): Unit

Informs this android.telecom.CallEventCallback on events raised from a android.telecom.InCallService presenting this call. These events and the associated extra keys for the Bundle parameter are mutually defined by a VoIP application and android.telecom.InCallService. This enables alternative calling surfaces, such as an automotive UI, to relay requests to perform other non-standard call actions to the app. For example, an automotive calling solution may offer the ability for the user to raise their hand during a meeting.

Parameters
event String: a string event identifier agreed upon between a VoIP application and an android.telecom.InCallService This value cannot be null.
extras Bundle: a android.os.Bundle containing information about the event, as agreed upon between a VoIP application and android.telecom.InCallService. This value cannot be null.

onMuteStateChanged

Added in API level 34
abstract fun onMuteStateChanged(isMuted: Boolean): Unit

Called when the mute state changes.

Parameters
isMuted Boolean: The current mute state.