Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#constants) \| [Methods](https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#inhmethods)

# ImsRcsManager

*** ** * ** ***


`
public


class
ImsRcsManager
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telephony.ims.ImsRcsManager |

<br />

*** ** * ** ***

Manager for interfacing with the framework RCS services, including the User Capability Exchange
(UCE) service, as well as managing user settings.

Use `https://developer.android.com/reference/android/telephony/ims/ImsManager#getImsRcsManager(int)` to create an instance of this manager.


Requires the `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_IMS` feature which can be detected using `https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)`.

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#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. |
| `int` | `https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#CAPABILITY_TYPE_NONE` Undefined capability type for initialization |
| `int` | `https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#CAPABILITY_TYPE_OPTIONS_UCE` This carrier supports User Capability Exchange using SIP OPTIONS as defined by the framework. |
| `int` | `https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#CAPABILITY_TYPE_PRESENCE_UCE` This carrier supports User Capability Exchange using a presence server as defined by the framework. |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#getRegistrationState(java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Integer>)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/java/lang/Integer> stateCallback) ` Gets the registration state of the IMS service. |
| ` void` | ` https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#getRegistrationTransportType(java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Integer>)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/java/lang/Integer> transportTypeCallback) ` Gets the Transport Type associated with the current IMS registration. |
| ` https://developer.android.com/reference/android/telephony/ims/RcsUceAdapter` | ` https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#getUceAdapter()() ` |
| ` void` | ` https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#registerImsRegistrationCallback(java.util.concurrent.Executor,%20android.telephony.ims.RegistrationManager.RegistrationCallback)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/ims/RegistrationManager.RegistrationCallback c) ` Registers a `https://developer.android.com/reference/android/telephony/ims/RegistrationManager.RegistrationCallback` with the system. |
| ` void` | ` https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#registerImsStateCallback(java.util.concurrent.Executor,%20android.telephony.ims.ImsStateCallback)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/ims/ImsStateCallback callback) ` Register a new callback, which is used to notify the registrant of changes to the state of the underlying IMS service that is attached to telephony to implement IMS functionality. |
| ` void` | ` https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#unregisterImsRegistrationCallback(android.telephony.ims.RegistrationManager.RegistrationCallback)(https://developer.android.com/reference/android/telephony/ims/RegistrationManager.RegistrationCallback c) ` Removes an existing `https://developer.android.com/reference/android/telephony/ims/RegistrationManager.RegistrationCallback`. |
| ` void` | ` https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#unregisterImsStateCallback(android.telephony.ims.ImsStateCallback)(https://developer.android.com/reference/android/telephony/ims/ImsStateCallback callback) ` Unregisters a previously registered callback. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(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` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(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` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 `https://developer.android.com/reference/android/content/Context#startActivity(android.content.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 `https://developer.android.com/reference/android/telephony/ims/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 `https://developer.android.com/reference/android/telephony/CarrierConfigManager.Ims#KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL`
or `https://developer.android.com/reference/android/telephony/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 `https://developer.android.com/reference/android/provider/Settings#EXTRA_SUB_ID` extra containing the subscription that the
setting will be be shown for.


Output: Nothing

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/ims/RcsUceAdapter`

Constant Value:

"android.telephony.ims.action.SHOW_CAPABILITY_DISCOVERY_OPT_IN"


### CAPABILITY_TYPE_NONE

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_TYPE_NONE
```

Undefined capability type for initialization

<br />

Constant Value:

0
(0x00000000)


### CAPABILITY_TYPE_OPTIONS_UCE

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_TYPE_OPTIONS_UCE
```

This carrier supports User Capability Exchange using SIP OPTIONS as defined by the
framework. If set, the RcsFeature should support capability exchange using SIP OPTIONS.
If not set, this RcsFeature should not service capability requests.

<br />

Constant Value:

1
(0x00000001)


### CAPABILITY_TYPE_PRESENCE_UCE

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_TYPE_PRESENCE_UCE
```

This carrier supports User Capability Exchange using a presence server as defined by the
framework. If set, the RcsFeature should support capability exchange using a presence
server. If not set, this RcsFeature should not publish capabilities or service capability
requests using presence.

<br />

Constant Value:

2
(0x00000002)


## Public methods

### getRegistrationState

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Gets the registration state of the IMS service.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE` or that the calling app has carrier privileges
(see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE`

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/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 `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `stateCallback` | `Consumer`: A callback called on the supplied `https://developer.android.com/reference/java/util/concurrent/Executor` that will contain the registration state of the IMS service, which will be one of the following: `https://developer.android.com/reference/android/telephony/ims/RegistrationManager#REGISTRATION_STATE_NOT_REGISTERED`, `https://developer.android.com/reference/android/telephony/ims/RegistrationManager#REGISTRATION_STATE_REGISTERING`, or `https://developer.android.com/reference/android/telephony/ims/RegistrationManager#REGISTRATION_STATE_REGISTERED`. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/telephony/ims/RegistrationManager#REGISTRATION_STATE_NOT_REGISTERED` - `https://developer.android.com/reference/android/telephony/ims/RegistrationManager#REGISTRATION_STATE_REGISTERING` - `https://developer.android.com/reference/android/telephony/ims/RegistrationManager#REGISTRATION_STATE_REGISTERED` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | If the device does not have `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_IMS`. |

### getRegistrationTransportType

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Gets the Transport Type associated with the current IMS registration.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE` or that the calling app has carrier privileges
(see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE`

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` that will be used to call the transportTypeCallback. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `transportTypeCallback` | `Consumer`: The transport type associated with the current IMS registration. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants#TRANSPORT_TYPE_WWAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants#TRANSPORT_TYPE_WLAN` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | If the device does not have `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_IMS`. |

### getUceAdapter

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RcsUceAdapter getUceAdapter ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/ims/RcsUceAdapter` | A `https://developer.android.com/reference/android/telephony/ims/RcsUceAdapter` used for User Capability Exchange (UCE) operations for this subscription. This value cannot be `null`. <br /> |

### registerImsRegistrationCallback

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Registers a `https://developer.android.com/reference/android/telephony/ims/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: `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE` or that the calling app has carrier privileges
(see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE`

<br />

| 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 `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `c` | `RegistrationManager.RegistrationCallback`: The `https://developer.android.com/reference/android/telephony/ims/RegistrationManager.RegistrationCallback` to be added. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/telephony/ims/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 `https://developer.android.com/reference/android/telephony/ims/ImsException#getCode()` for a more detailed reason. |
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | If the device does not have `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_IMS`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#unregisterImsRegistrationCallback(android.telephony.ims.RegistrationManager.RegistrationCallback)`

### registerImsStateCallback

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void registerImsStateCallback (Executor executor, 
                ImsStateCallback callback)
```

Register a new callback, which is used to notify the registrant of changes to
the state of the underlying IMS service that is attached to telephony to
implement IMS functionality. If the manager is created for
the `https://developer.android.com/reference/android/telephony/SubscriptionManager#DEFAULT_SUBSCRIPTION_ID`,
this throws an `https://developer.android.com/reference/android/telephony/ims/ImsException`.

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE`
or that the calling app has carrier privileges
(see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE` or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or android.Manifest.permission.ACCESS_RCS_USER_CAPABILITY_EXCHANGE

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: the Executor that will be used to call the `https://developer.android.com/reference/android/telephony/ims/ImsStateCallback`. This value cannot be `null`. <br /> |
| `callback` | `ImsStateCallback`: The callback instance being registered. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/android/telephony/ims/ImsException` | in the case that the callback can not be registered. See `https://developer.android.com/reference/android/telephony/ims/ImsException#getCode()` for more information on when this is called. |

### unregisterImsRegistrationCallback

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void unregisterImsRegistrationCallback (RegistrationManager.RegistrationCallback c)
```

Removes an existing `https://developer.android.com/reference/android/telephony/ims/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: `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE` or that the calling app has carrier privileges
(see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE`

<br />

| Parameters ||
|---|---|
| `c` | `RegistrationManager.RegistrationCallback`: The `https://developer.android.com/reference/android/telephony/ims/RegistrationManager.RegistrationCallback` to be removed. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | If the device does not have `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_IMS`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionManager.OnSubscriptionsChangedListener`
- `https://developer.android.com/reference/android/telephony/ims/ImsRcsManager#registerImsRegistrationCallback(java.util.concurrent.Executor,%20android.telephony.ims.RegistrationManager.RegistrationCallback)`

### unregisterImsStateCallback

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void unregisterImsStateCallback (ImsStateCallback callback)
```

Unregisters a previously registered callback.

<br />

| Parameters ||
|---|---|
| `callback` | `ImsStateCallback`: The callback instance to be unregistered. This value cannot be `null`. <br /> |