ImsException

public final class ImsException
extends Exception

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ android.telephony.ims.ImsException


This class defines an IMS-related exception that has been thrown while interacting with a device or carrier provided ImsService implementation.

Summary

Constants

int CODE_ERROR_INVALID_SUBSCRIPTION

The subscription ID associated with this operation is invalid or not active.

int CODE_ERROR_SERVICE_UNAVAILABLE

The operation has failed because there is no remote process available to service it.

int CODE_ERROR_UNSPECIFIED

The operation has failed due to an unknown or unspecified error.

int CODE_ERROR_UNSUPPORTED_OPERATION

This device or carrier configuration does not support this feature for this subscription.

Public methods

int getCode()

Inherited methods

Constants

CODE_ERROR_INVALID_SUBSCRIPTION

Added in API level 30
public static final int CODE_ERROR_INVALID_SUBSCRIPTION

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().

Constant Value: 3 (0x00000003)

CODE_ERROR_SERVICE_UNAVAILABLE

Added in API level 30
public static final int CODE_ERROR_SERVICE_UNAVAILABLE

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.

Constant Value: 1 (0x00000001)

CODE_ERROR_UNSPECIFIED

Added in API level 30
public static final int CODE_ERROR_UNSPECIFIED

The operation has failed due to an unknown or unspecified error.

Constant Value: 0 (0x00000000)

CODE_ERROR_UNSUPPORTED_OPERATION

Added in API level 30
public static final int CODE_ERROR_UNSUPPORTED_OPERATION

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.

Constant Value: 2 (0x00000002)

Public methods

getCode

Added in API level 30
public int getCode ()

Returns
int the IMS Error code that is associated with this ImsException. Value is CODE_ERROR_UNSPECIFIED, CODE_ERROR_SERVICE_UNAVAILABLE, CODE_ERROR_UNSUPPORTED_OPERATION, or CODE_ERROR_INVALID_SUBSCRIPTION