Added in API level 33

ProvisioningManager


open class ProvisioningManager
kotlin.Any
   ↳ android.telephony.ims.ProvisioningManager

Manages IMS provisioning and configuration parameters, as well as callbacks for apps to listen to changes in these configurations. IMS provisioning keys are defined per carrier or OEM using OMA-DM or other provisioning applications and may vary. It is up to the carrier and OEM applications to ensure that the correct provisioning keys are being used when integrating with a vendor's ImsService. Use android.telephony.ims.ImsManager#getProvisioningManager(int) to get an instance of this manager.
Requires the PackageManager#FEATURE_TELEPHONY_IMS feature which can be detected using PackageManager.hasSystemFeature(String).

Summary

Nested classes
abstract

Callback for IMS provisioning feature changes.

Public methods
open Boolean

Get the provisioning status for the IMS MmTel capability specified.

open Boolean

Get the provisioning status for the IMS RCS capability specified.

open Boolean

Indicates whether provisioning for the MMTEL capability and IMS registration technology specified is required or not

open Boolean

Indicates whether provisioning for the RCS capability and IMS registration technology specified is required or not

open Unit

Register a new FeatureProvisioningCallback, which is used to listen for IMS feature provisioning updates.

open Unit
setProvisioningStatusForCapability(capability: Int, tech: Int, isProvisioned: Boolean)

Set the provisioning status for the IMS MmTel capability using the specified subscription.

open Unit
setRcsProvisioningStatusForCapability(capability: Int, tech: Int, isProvisioned: Boolean)

Set the provisioning status for the IMS RCS capability using the specified subscription.

open Unit

Unregisters a previously registered FeatureProvisioningCallback instance.

Public methods

getProvisioningStatusForCapability

Added in API level 33
open fun getProvisioningStatusForCapability(
    capability: Int,
    tech: Int
): Boolean

Get the provisioning status for the IMS MmTel capability specified. If provisioning is not required for the queried capability and tech combination specified, this method will always return true.

Requires Permission:


This method may take several seconds to complete, so it should only be called from a worker thread.
Requires android.Manifest.permission#READ_PRECISE_PHONE_STATE
Parameters
capability Int: Value is either 0 or a combination of android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_CALL_COMPOSER, and android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_CALL_COMPOSER_BUSINESS_ONLY
tech Int: Value is android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NONE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_LTE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_CROSS_SIM, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NR, or android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_3G
Return
Boolean true if the device is provisioned for the capability or does not require provisioning, false if the capability does require provisioning and has not been provisioned yet.
Exceptions
java.lang.UnsupportedOperationException If the device does not have PackageManager#FEATURE_TELEPHONY_IMS.

getRcsProvisioningStatusForCapability

Added in API level 33
open fun getRcsProvisioningStatusForCapability(
    capability: Int,
    tech: Int
): Boolean

Get the provisioning status for the IMS RCS capability specified. If provisioning is not required for the queried capability or if the device does not support IMS this method will always return true.

Requires Permission:


This method may take several seconds to complete, so it should only be called from a worker thread.
Requires android.Manifest.permission#READ_PRECISE_PHONE_STATE
Parameters
capability Int: Value is either 0 or a combination of android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_NONE, android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_OPTIONS_UCE, and android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_PRESENCE_UCE
tech Int: Value is android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NONE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_LTE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_CROSS_SIM, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NR, or android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_3G
Return
Boolean true if the device is provisioned for the capability or does not require provisioning, false if the capability does require provisioning and has not been provisioned yet.
Exceptions
java.lang.UnsupportedOperationException If the device does not have PackageManager#FEATURE_TELEPHONY_IMS.

isProvisioningRequiredForCapability

Added in API level 33
open fun isProvisioningRequiredForCapability(
    capability: Int,
    tech: Int
): Boolean

Indicates whether provisioning for the MMTEL capability and IMS registration technology specified is required or not

Requires Permission:


Requires android.Manifest.permission#READ_PRECISE_PHONE_STATE
Parameters
capability Int: Value is either 0 or a combination of android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_CALL_COMPOSER, and android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_CALL_COMPOSER_BUSINESS_ONLY
tech Int: Value is android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NONE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_LTE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_CROSS_SIM, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NR, or android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_3G
Return
Boolean true if provisioning is required for the MMTEL capability and IMS registration technology specified, false if it is not required or if the device does not support IMS.
Exceptions
java.lang.UnsupportedOperationException If the device does not have PackageManager#FEATURE_TELEPHONY_IMS.

isRcsProvisioningRequiredForCapability

Added in API level 33
open fun isRcsProvisioningRequiredForCapability(
    capability: Int,
    tech: Int
): Boolean

Indicates whether provisioning for the RCS capability and IMS registration technology specified is required or not

Requires Permission:


Requires android.Manifest.permission#READ_PRECISE_PHONE_STATE
Parameters
capability Int: Value is either 0 or a combination of android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_NONE, android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_OPTIONS_UCE, and android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_PRESENCE_UCE
tech Int: Value is android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NONE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_LTE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_CROSS_SIM, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NR, or android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_3G
Return
Boolean true if provisioning is required for the RCS capability and IMS registration technology specified, false if it is not required or if the device does not support IMS.
Exceptions
java.lang.UnsupportedOperationException If the device does not have PackageManager#FEATURE_TELEPHONY_IMS.

registerFeatureProvisioningChangedCallback

Added in API level 33
open fun registerFeatureProvisioningChangedCallback(
    executor: Executor,
    callback: ProvisioningManager.FeatureProvisioningCallback
): Unit

Register a new FeatureProvisioningCallback, which is used to listen for IMS feature provisioning updates.

When the subscription associated with this callback is removed (SIM removed, ESIM swap,etc...), this callback will automatically be removed.

Requires Permission:


Requires android.Manifest.permission#READ_PRECISE_PHONE_STATE
Parameters
executor Executor: The executor that the callback methods will be called 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(). Otherwise, provide an Executor that dispatches to an appropriate thread.
callback ProvisioningManager.FeatureProvisioningCallback: The callback instance being registered. This value cannot be null.
Exceptions
android.telephony.ims.ImsException if the subscription associated with this callback is valid, but the service crashed, for example. See ImsException#getCode() for a more detailed reason.
java.lang.UnsupportedOperationException If the device does not have PackageManager#FEATURE_TELEPHONY_IMS.

setProvisioningStatusForCapability

Added in API level 33
open fun setProvisioningStatusForCapability(
    capability: Int,
    tech: Int,
    isProvisioned: Boolean
): Unit

Set the provisioning status for the IMS MmTel capability using the specified subscription. Provisioning may or may not be required, depending on the carrier configuration. If provisioning is not required for the carrier associated with this subscription or the device does not support the capability/technology combination specified, this operation will be a no-op.

Requires Permission:


This method may take several seconds to complete, so it should only be called from a worker thread.
Requires android.Manifest.permission#MODIFY_PHONE_STATE
Parameters
isProvisioned Boolean: true if the device is provisioned for UT over IMS, false otherwise.
capability Int: Value is either 0 or a combination of android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_CALL_COMPOSER, and android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_CALL_COMPOSER_BUSINESS_ONLY
tech Int: Value is android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NONE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_LTE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_CROSS_SIM, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NR, or android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_3G
Exceptions
java.lang.UnsupportedOperationException If the device does not have PackageManager#FEATURE_TELEPHONY_IMS.

setRcsProvisioningStatusForCapability

Added in API level 33
open fun setRcsProvisioningStatusForCapability(
    capability: Int,
    tech: Int,
    isProvisioned: Boolean
): Unit

Set the provisioning status for the IMS RCS capability using the specified subscription. Provisioning may or may not be required, depending on the carrier configuration. If provisioning is not required for the carrier associated with this subscription or the device does not support the capability/technology combination specified, this operation will be a no-op.

Requires Permission:


This method may take several seconds to complete, so it should only be called from a worker thread.
Requires android.Manifest.permission#MODIFY_PHONE_STATE
Parameters
isProvisioned Boolean: true if the device is provisioned for the RCS capability specified, false otherwise.
capability Int: Value is either 0 or a combination of android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_NONE, android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_OPTIONS_UCE, and android.telephony.ims.ImsRcsManager#CAPABILITY_TYPE_PRESENCE_UCE
tech Int: Value is android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NONE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_LTE, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_CROSS_SIM, android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_NR, or android.telephony.ims.stub.ImsRegistrationImplBase#REGISTRATION_TECH_3G
Exceptions
java.lang.UnsupportedOperationException If the device does not have PackageManager#FEATURE_TELEPHONY_IMS.

unregisterFeatureProvisioningChangedCallback

Added in API level 33
open fun unregisterFeatureProvisioningChangedCallback(callback: ProvisioningManager.FeatureProvisioningCallback): Unit

Unregisters a previously registered FeatureProvisioningCallback instance. 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.

Parameters
callback ProvisioningManager.FeatureProvisioningCallback: The existing FeatureProvisioningCallback to be removed. This value cannot be null.
Exceptions
java.lang.UnsupportedOperationException If the device does not have PackageManager#FEATURE_TELEPHONY_IMS.