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

# CarrierConfigManager.CarrierConfigChangeListener

*** ** * ** ***

` public static interface CarrierConfigManager.CarrierConfigChangeListener `   
` `

|---|
| android.telephony.CarrierConfigManager.CarrierConfigChangeListener |

<br />

*** ** * ** ***

Listener interface to get a notification when the carrier configurations have changed. Use this listener to receive timely updates when the carrier configuration changes. System components should prefer this listener over `https://developer.android.com/reference/android/telephony/CarrierConfigManager#ACTION_CARRIER_CONFIG_CHANGED` whenever possible. To register the listener, call `https://developer.android.com/reference/android/telephony/CarrierConfigManager#registerCarrierConfigChangeListener(java.util.concurrent.Executor,%20android.telephony.CarrierConfigManager.CarrierConfigChangeListener)`. To unregister, call `https://developer.android.com/reference/android/telephony/CarrierConfigManager#unregisterCarrierConfigChangeListener(android.telephony.CarrierConfigManager.CarrierConfigChangeListener)`. Note that on registration, registrants will NOT receive a notification on last carrier config change. Only carrier configs change AFTER the registration will be sent to registrants. And unlike `https://developer.android.com/reference/android/telephony/CarrierConfigManager#ACTION_CARRIER_CONFIG_CHANGED`, notification wouldn't send when the device is unlocked. Registrants only receive the notification when there has been real carrier config changes.
**See also:**

- `https://developer.android.com/reference/android/telephony/CarrierConfigManager#registerCarrierConfigChangeListener(java.util.concurrent.Executor,%20android.telephony.CarrierConfigManager.CarrierConfigChangeListener)`
- `https://developer.android.com/reference/android/telephony/CarrierConfigManager#unregisterCarrierConfigChangeListener(android.telephony.CarrierConfigManager.CarrierConfigChangeListener)`
- `https://developer.android.com/reference/android/telephony/CarrierConfigManager#ACTION_CARRIER_CONFIG_CHANGED`
- `https://developer.android.com/reference/android/telephony/CarrierConfigManager#getConfig(java.lang.String[])`
- `https://developer.android.com/reference/android/telephony/CarrierConfigManager#getConfigForSubId(int,%20java.lang.String[])`

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/telephony/CarrierConfigManager.CarrierConfigChangeListener#onCarrierConfigChanged(int,%20int,%20int,%20int)(int logicalSlotIndex, int subscriptionId, int carrierId, int specificCarrierId) ` Called when carrier configurations have changed. |

## Public methods

### onCarrierConfigChanged

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

```
public abstract void onCarrierConfigChanged (int logicalSlotIndex, 
                int subscriptionId, 
                int carrierId, 
                int specificCarrierId)
```

Called when carrier configurations have changed.

<br />

| Parameters ||
|---|---|
| `logicalSlotIndex` | `int`: The logical SIM slot index on which to monitor and get notification. It is guaranteed to be valid. <br /> |
| `subscriptionId` | `int`: The subscription on the SIM slot. May be `https://developer.android.com/reference/android/telephony/SubscriptionManager#INVALID_SUBSCRIPTION_ID`. <br /> |
| `carrierId` | `int`: The optional carrier Id, may be `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID`. See `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`. <br /> |
| `specificCarrierId` | `int`: The optional fine-grained carrierId, may be `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID`. A specific carrierId may be different from the carrierId above in a MVNO scenario. See detail in `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`. <br /> |