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.
See also:
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 | |
---|---|
Constants
REASON_IMS_SERVICE_DISCONNECTED
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
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
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
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
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
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
public abstract void onAvailable ()
The IMS service is connected and is ready for communication over the provided Manager.
onError
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
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.
Parameters | |
---|---|
reason |
int : the specified reason
Value is REASON_UNKNOWN_TEMPORARY_ERROR , REASON_UNKNOWN_PERMANENT_ERROR , REASON_IMS_SERVICE_DISCONNECTED , REASON_NO_IMS_SERVICE_CONFIGURED , REASON_SUBSCRIPTION_INACTIVE , or REASON_IMS_SERVICE_NOT_READY |