# Print output for @column tags ?>
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.
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 |
void
|
unregisterImsRegistrationCallback(RegistrationManager.RegistrationCallback c)
Removes an existing |
Inherited methods | |
---|---|
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:
Constant Value: "android.telephony.ims.action.SHOW_CAPABILITY_DISCOVERY_OPT_IN"
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 |
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 |
public RcsUceAdapter getUceAdapter ()
Returns | |
---|---|
RcsUceAdapter |
A RcsUceAdapter used for User Capability Exchange (UCE) operations for
this subscription.
This value cannot be null . |
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. |
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 . |