Stay organized with collections
Save and categorize content based on your preferences.
DataActivationStateListener
interface DataActivationStateListener
Interface for SIM data activation state listener.
Summary
Public methods |
abstract Unit |
Callback invoked when the SIM data activation state has changed on the registered subscription.
|
Public methods
onDataActivationStateChanged
abstract fun onDataActivationStateChanged(state: Int): Unit
Callback invoked when the SIM data activation 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 |
state |
Int: is the current SIM data activation state Value is android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN, android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_ACTIVATING, android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_ACTIVATED, android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_DEACTIVATED, or android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_RESTRICTED |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# TelephonyCallback.DataActivationStateListener\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDataActivationStateListener\n===========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/telephony/TelephonyCallback.DataActivationStateListener \"View this page in Java\") \n\n```\ninterface DataActivationStateListener\n```\n\n|----------------------------------------------------------------------|\n| [android.telephony.TelephonyCallback.DataActivationStateListener](#) |\n\nInterface for SIM data activation state listener.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onDataActivationStateChanged](#onDataActivationStateChanged(kotlin.Int))`(`state:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Callback invoked when the SIM data activation state has changed on the registered subscription. |\n\nPublic methods\n--------------\n\n### onDataActivationStateChanged\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onDataActivationStateChanged(state: Int): Unit\n```\n\nCallback invoked when the SIM data activation state has changed on the registered subscription. Note, the registration subscription ID comes from [TelephonyManager](/reference/kotlin/android/telephony/TelephonyManager) object which registers TelephonyCallback by [TelephonyManager.registerTelephonyCallback(Executor, TelephonyCallback)](/reference/kotlin/android/telephony/TelephonyManager#registerTelephonyCallback(java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)). If this TelephonyManager object was created with [TelephonyManager.createForSubscriptionId(int)](/reference/kotlin/android/telephony/TelephonyManager#createForSubscriptionId(kotlin.Int)), then the callback applies to the subscription ID. Otherwise, this callback applies to [SubscriptionManager.getDefaultSubscriptionId()](/reference/kotlin/android/telephony/SubscriptionManager#getDefaultSubscriptionId()).\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `state` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): is the current SIM data activation state Value is android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN, android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_ACTIVATING, android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_ACTIVATED, android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_DEACTIVATED, or android.telephony.TelephonyManager.SIM_ACTIVATION_STATE_RESTRICTED |"]]