Added in API level 31

MessageWaitingIndicatorListener


interface MessageWaitingIndicatorListener
android.telephony.TelephonyCallback.MessageWaitingIndicatorListener

Interface for message waiting indicator listener.

Summary

Public methods
abstract Unit

Callback invoked when the message-waiting indicator changes on the registered subscription.

Public methods

onMessageWaitingIndicatorChanged

Added in API level 31
abstract fun onMessageWaitingIndicatorChanged(mwi: Boolean): Unit

Callback invoked when the message-waiting indicator changes on the registered subscription. Note, the registration subscription ID comes from TelephonyManager object 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(). The calling app should have carrier privileges (see TelephonyManager#hasCarrierPrivileges) if it does not have the android.Manifest.permission#READ_PHONE_STATE.
Requires android.Manifest.permission#READ_PHONE_STATE