ProvisioningManager


public class ProvisioningManager
extends Object

java.lang.Object
   ↳ 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 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

class ProvisioningManager.FeatureProvisioningCallback

Callback for IMS provisioning feature changes. 

Public methods

boolean getProvisioningStatusForCapability(int capability, int tech)

Get the provisioning status for the IMS MmTel capability specified.

boolean getRcsProvisioningStatusForCapability(int capability, int tech)

Get the provisioning status for the IMS RCS capability specified.

boolean isProvisioningRequiredForCapability(int capability, int tech)

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

Requires Permission:

boolean isRcsProvisioningRequiredForCapability(int capability, int tech)

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

Requires Permission:

void registerFeatureProvisioningChangedCallback(Executor executor, ProvisioningManager.FeatureProvisioningCallback callback)

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

void setProvisioningStatusForCapability(int capability, int tech, boolean isProvisioned)

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

void setRcsProvisioningStatusForCapability(int capability, int tech, boolean isProvisioned)

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

void unregisterFeatureProvisioningChangedCallback(ProvisioningManager.FeatureProvisioningCallback callback)

Unregisters a previously registered FeatureProvisioningCallback instance.

Inherited methods

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 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 wait(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 wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public methods

getProvisioningStatusForCapability

Added in API level 33
public boolean getProvisioningStatusForCapability (int capability, 
                int tech)

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 Manifest.permission.READ_PRECISE_PHONE_STATE

Returns
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.

getRcsProvisioningStatusForCapability

Added in API level 33
public boolean getRcsProvisioningStatusForCapability (int capability, 
                int tech)

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 Manifest.permission.READ_PRECISE_PHONE_STATE

Returns
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.

isProvisioningRequiredForCapability

Added in API level 33
public boolean isProvisioningRequiredForCapability (int capability, 
                int tech)

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

Requires Permission:


Requires Manifest.permission.READ_PRECISE_PHONE_STATE

Returns
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.

isRcsProvisioningRequiredForCapability

Added in API level 33
public boolean isRcsProvisioningRequiredForCapability (int capability, 
                int tech)

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

Requires Permission:


Requires Manifest.permission.READ_PRECISE_PHONE_STATE

Returns
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.

registerFeatureProvisioningChangedCallback

Added in API level 33
public void registerFeatureProvisioningChangedCallback (Executor executor, 
                ProvisioningManager.FeatureProvisioningCallback callback)

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 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.

Throws
ImsException if the subscription associated with this callback is valid, but the service crashed, for example. See ImsException.getCode() for a more detailed reason.
UnsupportedOperationException If the device does not have PackageManager.FEATURE_TELEPHONY_IMS.

setProvisioningStatusForCapability

Added in API level 33
public void setProvisioningStatusForCapability (int capability, 
                int tech, 
                boolean isProvisioned)

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 Manifest.permission.MODIFY_PHONE_STATE

setRcsProvisioningStatusForCapability

Added in API level 33
public void setRcsProvisioningStatusForCapability (int capability, 
                int tech, 
                boolean isProvisioned)

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 Manifest.permission.MODIFY_PHONE_STATE

unregisterFeatureProvisioningChangedCallback

Added in API level 33
public void unregisterFeatureProvisioningChangedCallback (ProvisioningManager.FeatureProvisioningCallback callback)

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.