Stay organized with collections
Save and categorize content based on your preferences.
ImsException
class ImsException : Exception
This class defines an IMS-related exception that has been thrown while interacting with a device or carrier provided ImsService implementation.
Summary
Constants |
static Int |
The subscription ID associated with this operation is invalid or not active.
|
static Int |
The operation has failed because there is no remote process available to service it.
|
static Int |
The operation has failed due to an unknown or unspecified error.
|
static Int |
This device or carrier configuration does not support this feature for this subscription.
|
Constants
CODE_ERROR_INVALID_SUBSCRIPTION
static val CODE_ERROR_INVALID_SUBSCRIPTION: Int
The subscription ID associated with this operation is invalid or not active.
This is a configuration error and there should be no retry. The subscription used for this operation is either invalid or has become inactive. The active subscriptions can be queried with SubscriptionManager.getActiveSubscriptionInfoList()
.
Value: 3
CODE_ERROR_SERVICE_UNAVAILABLE
static val CODE_ERROR_SERVICE_UNAVAILABLE: Int
The operation has failed because there is no remote process available to service it. This may be due to a process crash or other illegal state.
This is a temporary error and the operation may be retried until the connection to the remote process is restored.
Value: 1
CODE_ERROR_UNSPECIFIED
static val CODE_ERROR_UNSPECIFIED: Int
The operation has failed due to an unknown or unspecified error.
Value: 0
CODE_ERROR_UNSUPPORTED_OPERATION
static val CODE_ERROR_UNSUPPORTED_OPERATION: Int
This device or carrier configuration does not support this feature for this subscription.
This is a permanent configuration error and there should be no retry until the subscription changes if this operation is denied due to a carrier configuration. If this is due to a device configuration, the feature PackageManager.FEATURE_TELEPHONY_IMS
is not available or the device has no ImsService implementation to service this request.
Value: 2
Public methods
getCode
fun getCode(): Int
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ImsException\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nImsException\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/telephony/ims/ImsException \"View this page in Java\") \n\n```\nclass ImsException : Exception\n```\n\n|---|---|---|-----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) |||\n| | ↳ | [java.lang.Exception](../../../java/lang/Exception.html#) ||\n| | | ↳ | [android.telephony.ims.ImsException](#) |\n\nThis class defines an IMS-related exception that has been thrown while interacting with a device or carrier provided ImsService implementation.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CODE_ERROR_INVALID_SUBSCRIPTION](#CODE_ERROR_INVALID_SUBSCRIPTION:kotlin.Int) The subscription ID associated with this operation is invalid or not active. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CODE_ERROR_SERVICE_UNAVAILABLE](#CODE_ERROR_SERVICE_UNAVAILABLE:kotlin.Int) The operation has failed because there is no remote process available to service it. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CODE_ERROR_UNSPECIFIED](#CODE_ERROR_UNSPECIFIED:kotlin.Int) The operation has failed due to an unknown or unspecified error. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CODE_ERROR_UNSUPPORTED_OPERATION](#CODE_ERROR_UNSUPPORTED_OPERATION:kotlin.Int) This device or carrier configuration does not support this feature for this subscription. |\n\n| Public methods ||\n|----------------------------------------------------------------------------|----------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getCode](#getCode())`()` \u003cbr /\u003e |\n\nConstants\n---------\n\n### CODE_ERROR_INVALID_SUBSCRIPTION\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CODE_ERROR_INVALID_SUBSCRIPTION: Int\n```\n\nThe subscription ID associated with this operation is invalid or not active.\n\nThis is a configuration error and there should be no retry. The subscription used for this operation is either invalid or has become inactive. The active subscriptions can be queried with [SubscriptionManager.getActiveSubscriptionInfoList()](../SubscriptionManager.html#getActiveSubscriptionInfoList()). \n\n Value: 3\n\n### CODE_ERROR_SERVICE_UNAVAILABLE\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CODE_ERROR_SERVICE_UNAVAILABLE: Int\n```\n\nThe operation has failed because there is no remote process available to service it. This may be due to a process crash or other illegal state.\n\nThis is a temporary error and the operation may be retried until the connection to the remote process is restored. \n\n Value: 1\n\n### CODE_ERROR_UNSPECIFIED\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CODE_ERROR_UNSPECIFIED: Int\n```\n\nThe operation has failed due to an unknown or unspecified error. \n\n Value: 0\n\n### CODE_ERROR_UNSUPPORTED_OPERATION\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CODE_ERROR_UNSUPPORTED_OPERATION: Int\n```\n\nThis device or carrier configuration does not support this feature for this subscription.\n\nThis is a permanent configuration error and there should be no retry until the subscription changes if this operation is denied due to a carrier configuration. If this is due to a device configuration, the feature [PackageManager.FEATURE_TELEPHONY_IMS](../../content/pm/PackageManager.html#FEATURE_TELEPHONY_IMS:kotlin.String) is not available or the device has no ImsService implementation to service this request. \n\n Value: 2\n\nPublic methods\n--------------\n\n### getCode\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getCode(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the IMS Error code that is associated with this [ImsException](#). Value is [android.telephony.ims.ImsException#CODE_ERROR_UNSPECIFIED](#CODE_ERROR_UNSPECIFIED:kotlin.Int), [android.telephony.ims.ImsException#CODE_ERROR_SERVICE_UNAVAILABLE](#CODE_ERROR_SERVICE_UNAVAILABLE:kotlin.Int), [android.telephony.ims.ImsException#CODE_ERROR_UNSUPPORTED_OPERATION](#CODE_ERROR_UNSUPPORTED_OPERATION:kotlin.Int), or [android.telephony.ims.ImsException#CODE_ERROR_INVALID_SUBSCRIPTION](#CODE_ERROR_INVALID_SUBSCRIPTION:kotlin.Int) |"]]