Added in API level 31

CallDisconnectCauseListener


interface CallDisconnectCauseListener
android.telephony.TelephonyCallback.CallDisconnectCauseListener

Interface for call disconnect cause listener.

Summary

Public methods
abstract Unit
onCallDisconnectCauseChanged(disconnectCause: Int, preciseDisconnectCause: Int)

Callback invoked when call disconnect cause changes on the registered subscription.

Public methods

onCallDisconnectCauseChanged

Added in API level 31
abstract fun onCallDisconnectCauseChanged(
    disconnectCause: Int,
    preciseDisconnectCause: Int
): Unit

Callback invoked when call disconnect cause changes on the registered subscription. Note, the registration subscription ID comes from TelephonyManager object which registers TelephonyCallback by TelephonyManager.registerTelephonyCallback(Executor, TelephonyCallback). If this TelephonyManager object was created with TelephonyManager.createForSubscriptionId(int), then the callback applies to the subscription ID. Otherwise, this callback applies to SubscriptionManager.getDefaultSubscriptionId().
Requires android.Manifest.permission#READ_PRECISE_PHONE_STATE

Parameters
disconnectCause Int: the disconnect cause.
Value is one of the following:
preciseDisconnectCause Int: the precise disconnect cause.
Value is one of the following: