Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# TelephonyCallback.UserMobileDataStateListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/telephony/TelephonyCallback.UserMobileDataStateListener "View this page in Kotlin") \|Java


`
public
static


interface
TelephonyCallback.UserMobileDataStateListener
`


`


`

|---|
| android.telephony.TelephonyCallback.UserMobileDataStateListener |

<br />

*** ** * ** ***

Interface for user mobile data state listener.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/telephony/TelephonyCallback.UserMobileDataStateListener#onUserMobileDataStateChanged(boolean)(boolean enabled) ` Callback invoked when the user mobile data state has changed on the registered subscription. |

## Public methods

### onUserMobileDataStateChanged

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onUserMobileDataStateChanged (boolean enabled)
```

Callback invoked when the user mobile data state has changed on the registered
subscription.
Note, the registration subscription ID comes from `https://developer.android.com/reference/android/telephony/TelephonyManager` object
which registers TelephonyCallback by
`https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)`.
If this TelephonyManager object was created with
`https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, then the callback applies to the
subscription ID. Otherwise, this callback applies to
`https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: indicates whether the current user mobile data state is enabled or disabled. <br /> |