# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# ImsRcsManager

`public class ImsRcsManager`
`extends Object` ``

java.lang.Object
↳ | android.telephony.ims.ImsRcsManager

Manager for interfacing with the framework RCS services, including the User Capability Exchange (UCE) service, as well as managing user settings. Use `ImsManager#getImsRcsManager(int)` to create an instance of this manager.

## Summary

### Constants
`String` | `ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN` Activity Action: Show the opt-in dialog for enabling or disabling RCS contact discovery using User Capability Exchange (UCE), which enables a service that periodically shares the phone numbers of all of the contacts in the user's address book with the carrier to refresh the RCS capabilities associated with those contacts as the local cache becomes stale.

### Public methods
`void` | `getRegistrationState(Executor executor, Consumer<Integer> stateCallback)` Gets the registration state of the IMS service.
`void` | `getRegistrationTransportType(Executor executor, Consumer<Integer> transportTypeCallback)` Gets the Transport Type associated with the current IMS registration.
`RcsUceAdapter` | `getUceAdapter()`
`void` | `registerImsRegistrationCallback(Executor executor, RegistrationManager.RegistrationCallback c)` Registers a `RegistrationManager.RegistrationCallback` with the system.
`void` | `unregisterImsRegistrationCallback(RegistrationManager.RegistrationCallback c)` Removes an existing `RegistrationManager.RegistrationCallback`.

### Inherited methods
From class `java.lang.Object`
`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 timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN

    public static final String ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN

Activity Action: Show the opt-in dialog for enabling or disabling RCS contact discovery using User Capability Exchange (UCE), which enables a service that periodically shares the phone numbers of all of the contacts in the user's address book with the carrier to refresh the RCS capabilities associated with those contacts as the local cache becomes stale.

An application that depends on RCS contact discovery being enabled must send this intent using `Context#startActivity(Intent)` to ask the user to opt-in for contacts upload for capability exchange if it is currently disabled. Whether or not RCS contact discovery has been enabled by the user can be queried using `RcsUceAdapter#isUceSettingEnabled()`.

This intent will always be handled by the system, however the application should only send this Intent if the carrier supports bulk RCS contact exchange, which will be true if either key `CarrierConfigManager.Ims.KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL` or `CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL` is set to true. Otherwise, the RCS contact discovery opt-in dialog will not be shown.

Input: A mandatory `Settings#EXTRA_SUB_ID` extra containing the subscription that the setting will be be shown for.

Output: Nothing

See also:

- `RcsUceAdapter`

Constant Value: "android.telephony.ims.action.SHOW_CAPABILITY_DISCOVERY_OPT_IN"

## Public methods

### getRegistrationState

    public void getRegistrationState (Executor executor,
                    Consumer<Integer> stateCallback)

Gets the registration state of the IMS service. Requires Permission: `READ_PRECISE_PHONE_STATE` or that the calling app has carrier privileges (see `TelephonyManager.hasCarrierPrivileges()`).
Requires `Manifest.permission.READ_PRECISE_PHONE_STATE`

Parameters
`executor` | `Executor`: The `Executor` that will be used to call the IMS registration state callback. This value cannot be `null`. Callback and listener events are dispatched through this `Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `Context.getMainExecutor()`. To dispatch events through a shared thread pool, you can use `AsyncTask#THREAD_POOL_EXECUTOR`.
`stateCallback` | `Consumer`: A callback called on the supplied `Executor` that will contain the registration state of the IMS service, which will be one of the following: `RegistrationManager#REGISTRATION_STATE_NOT_REGISTERED`, `RegistrationManager#REGISTRATION_STATE_REGISTERING`, or `RegistrationManager#REGISTRATION_STATE_REGISTERED`. This value cannot be `null`. Value is `RegistrationManager.REGISTRATION_STATE_NOT_REGISTERED`, `RegistrationManager.REGISTRATION_STATE_REGISTERING`, or `RegistrationManager.REGISTRATION_STATE_REGISTERED`

### getRegistrationTransportType

    public void getRegistrationTransportType (Executor executor,
                    Consumer<Integer> transportTypeCallback)

Gets the Transport Type associated with the current IMS registration. Requires Permission: `READ_PRECISE_PHONE_STATE` or that the calling app has carrier privileges (see `TelephonyManager.hasCarrierPrivileges()`).
Requires `Manifest.permission.READ_PRECISE_PHONE_STATE`

Parameters
`executor` | `Executor`: The `Executor` that will be used to call the transportTypeCallback. This value cannot be `null`. Callback and listener events are dispatched through this `Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `Context.getMainExecutor()`. To dispatch events through a shared thread pool, you can use `AsyncTask#THREAD_POOL_EXECUTOR`.
`transportTypeCallback` | `Consumer`: The transport type associated with the current IMS registration, which will be one of following: , , or . This value cannot be `null`. Value is android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_INVALID, `AccessNetworkConstants.TRANSPORT_TYPE_WWAN`, or `AccessNetworkConstants.TRANSPORT_TYPE_WLAN`

### getUceAdapter

    public RcsUceAdapter getUceAdapter ()

Returns
`RcsUceAdapter` | A `RcsUceAdapter` used for User Capability Exchange (UCE) operations for this subscription. This value cannot be `null`.

### registerImsRegistrationCallback

    public void registerImsRegistrationCallback (Executor executor,
                    RegistrationManager.RegistrationCallback c)

Registers a `RegistrationManager.RegistrationCallback` with the system. When the callback is registered, it will initiate the callback c to be called with the current registration state. Requires Permission: `READ_PRECISE_PHONE_STATE` or that the calling app has carrier privileges (see `TelephonyManager.hasCarrierPrivileges()`).
Requires `Manifest.permission.READ_PRECISE_PHONE_STATE`

Parameters
`executor` | `Executor`: The executor the callback events should be run on. This value cannot be `null`. Callback and listener events are dispatched through this `Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `Context.getMainExecutor()`. To dispatch events through a shared thread pool, you can use `AsyncTask#THREAD_POOL_EXECUTOR`.
`c` | `RegistrationManager.RegistrationCallback`: The `RegistrationManager.RegistrationCallback` to be added. This value cannot be `null`.

Throws
`ImsException` | if the subscription associated with this callback is valid, but the `ImsService` associated with the subscription is not available. This can happen if the service crashed, for example. See `ImsException#getCode()` for a more detailed reason.

See also:

- `unregisterImsRegistrationCallback(RegistrationManager.RegistrationCallback)`

### unregisterImsRegistrationCallback

    public void unregisterImsRegistrationCallback (RegistrationManager.RegistrationCallback c)

Removes an existing `RegistrationManager.RegistrationCallback`. When the subscription associated with this callback is removed (SIM removed, ESIM swap, etc...), this callback will automatically be removed. If this method is called for an inactive subscription, it will result in a no-op. Requires Permission: `READ_PRECISE_PHONE_STATE` or that the calling app has carrier privileges (see `TelephonyManager.hasCarrierPrivileges()`).
Requires `Manifest.permission.READ_PRECISE_PHONE_STATE`

Parameters
`c` | `RegistrationManager.RegistrationCallback`: The `RegistrationManager.RegistrationCallback` to be removed. This value cannot be `null`.

See also:

- `SubscriptionManager.OnSubscriptionsChangedListener`
- `registerImsRegistrationCallback(Executor, RegistrationCallback)`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*