UserMobileDataStateListener
interface UserMobileDataStateListener
| android.telephony.TelephonyCallback.UserMobileDataStateListener |
Interface for user mobile data state listener.
Summary
| Public methods | |
|---|---|
| abstract Unit |
onUserMobileDataStateChanged(enabled: Boolean)Callback invoked when the user mobile data state has changed on the registered subscription. |
Public methods
onUserMobileDataStateChanged
abstract fun onUserMobileDataStateChanged(enabled: Boolean): Unit
Callback invoked when the user mobile data state has changed 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().
| Parameters | |
|---|---|
enabled |
Boolean: indicates whether the current user mobile data state is enabled or disabled. |