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 android.telephony.DisconnectCause#NOT_VALID, android.telephony.DisconnectCause#NOT_DISCONNECTED, android.telephony.DisconnectCause#INCOMING_MISSED, android.telephony.DisconnectCause#NORMAL, android.telephony.DisconnectCause#LOCAL, android.telephony.DisconnectCause#BUSY, android.telephony.DisconnectCause#CONGESTION, android.telephony.DisconnectCause#MMI, android.telephony.DisconnectCause#INVALID_NUMBER, android.telephony.DisconnectCause#NUMBER_UNREACHABLE, android.telephony.DisconnectCause#SERVER_UNREACHABLE, android.telephony.DisconnectCause#INVALID_CREDENTIALS, android.telephony.DisconnectCause#OUT_OF_NETWORK, android.telephony.DisconnectCause#SERVER_ERROR, android.telephony.DisconnectCause#TIMED_OUT, android.telephony.DisconnectCause#LOST_SIGNAL, android.telephony.DisconnectCause#LIMIT_EXCEEDED, android.telephony.DisconnectCause#INCOMING_REJECTED, android.telephony.DisconnectCause#POWER_OFF, android.telephony.DisconnectCause#OUT_OF_SERVICE, android.telephony.DisconnectCause#ICC_ERROR, android.telephony.DisconnectCause#CALL_BARRED, android.telephony.DisconnectCause#FDN_BLOCKED, android.telephony.DisconnectCause#CS_RESTRICTED, android.telephony.DisconnectCause#CS_RESTRICTED_NORMAL, android.telephony.DisconnectCause#CS_RESTRICTED_EMERGENCY, android.telephony.DisconnectCause#UNOBTAINABLE_NUMBER, android.telephony.DisconnectCause#CDMA_LOCKED_UNTIL_POWER_CYCLE, android.telephony.DisconnectCause#CDMA_DROP, android.telephony.DisconnectCause#CDMA_INTERCEPT, android.telephony.DisconnectCause#CDMA_REORDER, android.telephony.DisconnectCause#CDMA_SO_REJECT, android.telephony.DisconnectCause#CDMA_RETRY_ORDER, android.telephony.DisconnectCause#CDMA_ACCESS_FAILURE, android.telephony.DisconnectCause#CDMA_PREEMPTED, android.telephony.DisconnectCause#CDMA_NOT_EMERGENCY, android.telephony.DisconnectCause#CDMA_ACCESS_BLOCKED, or android.telephony.DisconnectCause#ERROR_UNSPECIFIED
preciseDisconnectCause Int: the precise disconnect cause Value is android.telephony.PreciseDisconnectCause.NOT_VALID, android.telephony.PreciseDisconnectCause.NO_DISCONNECT_CAUSE_AVAILABLE, android.telephony.PreciseDisconnectCause.UNOBTAINABLE_NUMBER, android.telephony.PreciseDisconnectCause.NORMAL, android.telephony.PreciseDisconnectCause.BUSY, android.telephony.PreciseDisconnectCause.NUMBER_CHANGED, android.telephony.PreciseDisconnectCause.STATUS_ENQUIRY, android.telephony.PreciseDisconnectCause.NORMAL_UNSPECIFIED, android.telephony.PreciseDisconnectCause.NO_CIRCUIT_AVAIL, android.telephony.PreciseDisconnectCause.TEMPORARY_FAILURE, android.telephony.PreciseDisconnectCause.SWITCHING_CONGESTION, android.telephony.PreciseDisconnectCause.CHANNEL_NOT_AVAIL, android.telephony.PreciseDisconnectCause.QOS_NOT_AVAIL, android.telephony.PreciseDisconnectCause.BEARER_NOT_AVAIL, android.telephony.PreciseDisconnectCause.ACM_LIMIT_EXCEEDED, android.telephony.PreciseDisconnectCause.CALL_BARRED, android.telephony.PreciseDisconnectCause.FDN_BLOCKED, android.telephony.PreciseDisconnectCause.IMSI_UNKNOWN_IN_VLR, android.telephony.PreciseDisconnectCause.IMEI_NOT_ACCEPTED, android.telephony.PreciseDisconnectCause.CDMA_LOCKED_UNTIL_POWER_CYCLE, android.telephony.PreciseDisconnectCause.CDMA_DROP, android.telephony.PreciseDisconnectCause.CDMA_INTERCEPT, android.telephony.PreciseDisconnectCause.CDMA_REORDER, android.telephony.PreciseDisconnectCause.CDMA_SO_REJECT, android.telephony.PreciseDisconnectCause.CDMA_RETRY_ORDER, android.telephony.PreciseDisconnectCause.CDMA_ACCESS_FAILURE, android.telephony.PreciseDisconnectCause.CDMA_PREEMPTED, android.telephony.PreciseDisconnectCause.CDMA_NOT_EMERGENCY, android.telephony.PreciseDisconnectCause.CDMA_ACCESS_BLOCKED, or android.telephony.PreciseDisconnectCause.ERROR_UNSPECIFIED