ImsMmTelManager | API reference | Android Developers (original) (raw)
public class ImsMmTelManagerextends [Object](/reference/java/lang/Object) implements[RegistrationManager](/reference/android/telephony/ims/RegistrationManager)
A manager for the MmTel (Multimedia Telephony) feature of an IMS network, given an associated subscription. Allows a user to query the IMS MmTel feature information for a subscription, register for registration and MmTel capability status callbacks, as well as query/modify user settings for the associated subscription. Use [ImsManager.getImsMmTelManager(int)](/reference/android/telephony/ims/ImsManager#getImsMmTelManager%28int%29) to get an instance of this manager.
Requires the [PackageManager#FEATURE_TELEPHONY_IMS](/reference/android/content/pm/PackageManager#FEATURE%5FTELEPHONY%5FIMS) feature which can be detected using [PackageManager.hasSystemFeature(String)](/reference/android/content/pm/PackageManager#hasSystemFeature%28java.lang.String%29).
Summary
| Nested classes | |
|---|---|
| class | ImsMmTelManager.CapabilityCallback Receives IMS capability status updates from the ImsService. |
| Constants | |
|---|---|
| int | WIFI_MODE_CELLULAR_PREFERRED Prefer registering for IMS over LTE if LTE signal quality is high enough. |
| int | WIFI_MODE_WIFI_ONLY Register for IMS over IWLAN if WiFi signal quality is high enough. |
| int | WIFI_MODE_WIFI_PREFERRED Prefer registering for IMS over IWLAN if possible if WiFi signal quality is high enough. |
| Inherited constants |
|---|
| From interfaceandroid.telephony.ims.RegistrationManager int REGISTRATION_STATE_NOT_REGISTERED The IMS service is currently not registered to the carrier network. int REGISTRATION_STATE_REGISTERED The IMS service is currently registered to the carrier network. int REGISTRATION_STATE_REGISTERING The IMS service is currently in the process of registering to the carrier network. |
| Public methods | |
|---|---|
| void | getRegistrationState(Executor executor, Consumer<Integer> stateCallback) Gets the registration state of the IMS service. Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE |
| void | getRegistrationTransportType(Executor executor, Consumer<Integer> transportTypeCallback) Requires Permission: READ_PRECISE_PHONE_STATE or that the calling app has carrier privileges (see TelephonyManager.hasCarrierPrivileges()). |
| int | getVoWiFiModeSetting() Returns the user's voice over WiFi Roaming mode setting associated with the device. |
| boolean | isAdvancedCallingSettingEnabled() Query the user\u2019s setting for \u201cAdvanced Calling\u201d or "Enhanced 4G LTE", which is used to enable MmTel IMS features, depending on the carrier configuration for the current subscription. |
| boolean | isCrossSimCallingEnabled() This configuration is meaningful only on dual sim device. |
| boolean | isTtyOverVolteEnabled() Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or Manifest.permission.READ_PRECISE_PHONE_STATE |
| boolean | isVoWiFiRoamingSettingEnabled() Returns the user's voice over WiFi roaming setting associated with the current subscription. |
| boolean | isVoWiFiSettingEnabled() Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or Manifest.permission.READ_PRECISE_PHONE_STATE |
| boolean | isVtSettingEnabled() The user's setting for whether or not they have enabled the "Video Calling" setting. |
| void | registerImsRegistrationCallback(Executor executor, RegistrationManager.RegistrationCallback c) Requires Permission: READ_PRECISE_PHONE_STATE or that the calling app has carrier privileges (see TelephonyManager.hasCarrierPrivileges()). |
| 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. |
| void | registerMmTelCapabilityCallback(Executor executor, ImsMmTelManager.CapabilityCallback c) Registers a CapabilityCallback with the system, which will provide MmTel service availability updates for the subscription specified inImsManager.getImsMmTelManager(int). |
| void | unregisterImsRegistrationCallback(RegistrationManager.RegistrationCallback c) Requires Permission: READ_PRECISE_PHONE_STATE or that the calling app has carrier privileges (see TelephonyManager.hasCarrierPrivileges()). |
| void | unregisterImsStateCallback(ImsStateCallback callback) Unregisters a previously registered callback. |
| void | unregisterMmTelCapabilityCallback(ImsMmTelManager.CapabilityCallback c) Removes an existing MmTel CapabilityCallback. |
| 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. finalClass<?> 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. |
| From interface android.telephony.ims.RegistrationManager abstract void getRegistrationState(Executor executor, Consumer<Integer> stateCallback) Gets the registration state of the IMS service. abstract void getRegistrationTransportType(Executor executor, Consumer<Integer> transportTypeCallback) Gets the Transport Type associated with the current IMS registration. abstract void registerImsRegistrationCallback(Executor executor, RegistrationManager.RegistrationCallback c) Registers a RegistrationCallback with the system. abstract void unregisterImsRegistrationCallback(RegistrationManager.RegistrationCallback c) Removes an existing RegistrationCallback. |
Constants
WIFI_MODE_CELLULAR_PREFERRED
public static final int WIFI_MODE_CELLULAR_PREFERRED
Prefer registering for IMS over LTE if LTE signal quality is high enough.
Constant Value: 1 (0x00000001)
WIFI_MODE_WIFI_ONLY
public static final int WIFI_MODE_WIFI_ONLY
Register for IMS over IWLAN if WiFi signal quality is high enough. Do not hand over to LTE registration if signal quality degrades.
Constant Value: 0 (0x00000000)
WIFI_MODE_WIFI_PREFERRED
public static final int WIFI_MODE_WIFI_PREFERRED
Prefer registering for IMS over IWLAN if possible if WiFi signal quality is high enough.
Constant Value: 2 (0x00000002)
Public methods
isCrossSimCallingEnabled
public boolean isCrossSimCallingEnabled ()
This configuration is meaningful only on dual sim device. If enabled, this will result in the device setting up IMS of all other active subscriptions over the INTERNET APN of the primary default data subscription when any of those subscriptions are roaming or out of service and if wifi is not available for VoWifi. This feature will be disabled if[CarrierConfigManager.KEY_CARRIER_CROSS_SIM_IMS_AVAILABLE_BOOL](/reference/android/telephony/CarrierConfigManager#KEY%5FCARRIER%5FCROSS%5FSIM%5FIMS%5FAVAILABLE%5FBOOL) is set to false.
Following are the conditions in which system will try to register IMS over cross sim
- Wifi is not available, one SIM is roaming and the default data SIM is in home network. Then roaming SIM IMS will be registered over INTERNET APN of the default data subscription
- Wifi is not available, one SIM is out of service and the default data SIM is in home network. Then out of service SIM IMS will be registered over INTERNET APN of the default data subscription
This API requires one of the following:
- The caller holds the READ_PRECISE_PHONE_STATE permission.
- If the caller is the device or profile owner, the caller holds the
[Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)permission. - The caller has carrier privileges (see
[TelephonyManager.hasCarrierPrivileges()](/reference/android/telephony/TelephonyManager#hasCarrierPrivileges%28%29)) on any active subscription.
The profile owner is an app that owns a managed profile on the device; for more details see Work profiles. Access by profile owners is deprecated and will be removed in a future release.
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or [Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)
| Returns | |
|---|---|
| boolean | true if the user's setting for Voice over Cross SIM is enabled and false if it is not |
| Throws | |
|---|---|
| ImsException | if the IMS service associated with this subscription is not available or the IMS service is not available. |
| UnsupportedOperationException | If the device does not havePackageManager.FEATURE_TELEPHONY_IMS. |
isVoWiFiRoamingSettingEnabled
public boolean isVoWiFiRoamingSettingEnabled ()
Returns the user's voice over WiFi roaming setting associated with the current subscription.
This API requires one of the following:
- The caller holds the READ_PRECISE_PHONE_STATE permission.
- If the caller is the device or profile owner, the caller holds the
[Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)permission. - The caller has carrier privileges (see
[TelephonyManager.hasCarrierPrivileges()](/reference/android/telephony/TelephonyManager#hasCarrierPrivileges%28%29)) on any active subscription.
The profile owner is an app that owns a managed profile on the device; for more details see Work profiles. Access by profile owners is deprecated and will be removed in a future release.
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or [Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)
| Returns | |
|---|---|
| boolean | true if the user's setting for Voice over WiFi while roaming is enabled, false if disabled. |
| Throws | |
|---|---|
| IllegalArgumentException | if the subscription associated with this operation is not active (SIM is not inserted, ESIM inactive) or invalid. |
| UnsupportedOperationException | If the device does not havePackageManager.FEATURE_TELEPHONY_IMS. |
isVtSettingEnabled
public boolean isVtSettingEnabled ()
The user's setting for whether or not they have enabled the "Video Calling" setting.
Note: If the carrier configuration for advanced calling is not editable or hidden, this method will always return the default value.
This API requires one of the following:
- The caller holds the READ_PRECISE_PHONE_STATE permission.
- If the caller is the device or profile owner, the caller holds the
[Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)permission. - The caller has carrier privileges (see
[TelephonyManager.hasCarrierPrivileges()](/reference/android/telephony/TelephonyManager#hasCarrierPrivileges%28%29)) on any active subscription.
The profile owner is an app that owns a managed profile on the device; for more details see Work profiles. Access by profile owners is deprecated and will be removed in a future release.
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or [Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)
| Returns | |
|---|---|
| boolean | true if the user\u2019s \u201cVideo Calling\u201d setting is currently enabled. |
| Throws | |
|---|---|
| IllegalArgumentException | if the subscription associated with this operation is not active (SIM is not inserted, ESIM inactive) or invalid. |
| UnsupportedOperationException | If the device does not havePackageManager.FEATURE_TELEPHONY_IMS. |
unregisterImsRegistrationCallback
public void unregisterImsRegistrationCallback (RegistrationManager.RegistrationCallback c)
Requires Permission: [READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE) or that the calling app has carrier privileges (see [TelephonyManager.hasCarrierPrivileges()](/reference/android/telephony/TelephonyManager#hasCarrierPrivileges%28%29)). Access by profile owners is deprecated and will be removed in a future release. Removes an existing [RegistrationCallback](/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 android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or [Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)
| Parameters | |
|---|---|
| c | RegistrationManager.RegistrationCallback: This value cannot be null. |
unregisterImsStateCallback
public void unregisterImsStateCallback (ImsStateCallback callback)
Unregisters a previously registered callback.
| Parameters | |
|---|---|
| callback | ImsStateCallback: The callback instance to be unregistered. This value cannot be null. |
unregisterMmTelCapabilityCallback
public void unregisterMmTelCapabilityCallback (ImsMmTelManager.CapabilityCallback c)
Removes an existing MmTel [CapabilityCallback](/reference/android/telephony/ims/ImsMmTelManager.CapabilityCallback). 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.
This API requires one of the following:
- The caller holds the READ_PRECISE_PHONE_STATE permission.
- If the caller is the device or profile owner, the caller holds the
[Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)permission. - The caller has carrier privileges (see
[TelephonyManager.hasCarrierPrivileges()](/reference/android/telephony/TelephonyManager#hasCarrierPrivileges%28%29)) on any active subscription.
The profile owner is an app that owns a managed profile on the device; for more details see Work profiles. Access by profile owners is deprecated and will be removed in a future release.
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or [Manifest.permission.READ_PRECISE_PHONE_STATE](/reference/android/Manifest.permission#READ%5FPRECISE%5FPHONE%5FSTATE)
| Parameters | |
|---|---|
| c | ImsMmTelManager.CapabilityCallback: The MmTel CapabilityCallback to be removed. This value cannot be null. |