ImsStateCallback


public abstract class ImsStateCallback
extends Object

java.lang.Object
   ↳ android.telephony.ims.ImsStateCallback


A callback class used for monitoring changes in IMS service connection states for a specific subscription.

Summary

Constants

int REASON_IMS_SERVICE_DISCONNECTED

The underlying IMS service has died, is reconfiguring, or has never come up yet and as a result is currently unavailable.

int REASON_IMS_SERVICE_NOT_READY

The IMS service is connected, but in a NOT_READY state.

int REASON_NO_IMS_SERVICE_CONFIGURED

There is no IMS service configured for the subscription ID specified.

int REASON_SUBSCRIPTION_INACTIVE

The subscription associated with this Manager has moved to an inactive state (e.g. SIM removed) and the IMS service has torn down the resources related to this subscription.

int REASON_UNKNOWN_PERMANENT_ERROR

The underlying IMS service is permanently unavailable for the associated subscription and there will be no Manager available for this subscription.

int REASON_UNKNOWN_TEMPORARY_ERROR

The underlying IMS service is temporarily unavailable for the associated subscription.

Public constructors

ImsStateCallback()

Public methods

abstract void onAvailable()

The IMS service is connected and is ready for communication over the provided Manager.

abstract void onError()

An unexpected error has occurred and the Telephony process has crashed.

abstract void onUnavailable(int reason)

The IMS service has disconnected or is reporting NOT_READY and is no longer available to users.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

REASON_IMS_SERVICE_DISCONNECTED

Added in API level 33
public static final int REASON_IMS_SERVICE_DISCONNECTED

The underlying IMS service has died, is reconfiguring, or has never come up yet and as a result is currently unavailable. onAvailable() will be called when the IMS service becomes available. All callbacks should be unregistered now and registered again if the IMS service moves back to available.

Constant Value: 3 (0x00000003)

REASON_IMS_SERVICE_NOT_READY

Added in API level 33
public static final int REASON_IMS_SERVICE_NOT_READY

The IMS service is connected, but in a NOT_READY state. Once the service moves to ready, onAvailable() will be called.

Constant Value: 6 (0x00000006)

REASON_NO_IMS_SERVICE_CONFIGURED

Added in API level 33
public static final int REASON_NO_IMS_SERVICE_CONFIGURED

There is no IMS service configured for the subscription ID specified. This is a permanent error and there will be no Manager available for this subscription.

Constant Value: 4 (0x00000004)

REASON_SUBSCRIPTION_INACTIVE

Added in API level 33
public static final int REASON_SUBSCRIPTION_INACTIVE

The subscription associated with this Manager has moved to an inactive state (e.g. SIM removed) and the IMS service has torn down the resources related to this subscription. This has caused this callback to be deregistered. The callback must be re-registered when this subscription becomes active in order to continue listening to the IMS service state.

Constant Value: 5 (0x00000005)

REASON_UNKNOWN_PERMANENT_ERROR

Added in API level 33
public static final int REASON_UNKNOWN_PERMANENT_ERROR

The underlying IMS service is permanently unavailable for the associated subscription and there will be no Manager available for this subscription.

Constant Value: 2 (0x00000002)

REASON_UNKNOWN_TEMPORARY_ERROR

Added in API level 33
public static final int REASON_UNKNOWN_TEMPORARY_ERROR

The underlying IMS service is temporarily unavailable for the associated subscription. onAvailable() will be called when the IMS service becomes available again.

Constant Value: 1 (0x00000001)

Public constructors

ImsStateCallback

public ImsStateCallback ()

Public methods

onAvailable

Added in API level 33
public abstract void onAvailable ()

The IMS service is connected and is ready for communication over the provided Manager.

onError

Added in API level 33
public abstract void onError ()

An unexpected error has occurred and the Telephony process has crashed. This has caused this callback to be deregistered. The callback must be re-registered in order to continue listening to the IMS service state.

onUnavailable

Added in API level 33
public abstract void onUnavailable (int reason)

The IMS service has disconnected or is reporting NOT_READY and is no longer available to users. The user should clean up all related state and unregister callbacks. If it is a temporary error, onAvailable() will be called when the IMS service becomes available again.