Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/telephony/TelephonyManager#nestedclasses) \| [Constants](https://developer.android.com/reference/android/telephony/TelephonyManager#constants) \| [Fields](https://developer.android.com/reference/android/telephony/TelephonyManager#lfields) \| [Methods](https://developer.android.com/reference/android/telephony/TelephonyManager#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telephony/TelephonyManager#inhmethods)

# TelephonyManager

*** ** * ** ***


`
public


class
TelephonyManager
`


`

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


`

`


`

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

<br />

*** ** * ** ***

Provides access to information about the telephony services on
the device. Applications can use the methods in this class to
determine telephony services and states, as well as to access some
types of subscriber information. Applications can also register
a listener to receive notification of telephony state changes.


The returned TelephonyManager will use the default subscription for all calls.
To call an API for a specific subscription, use `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`. e.g.
`
telephonyManager = defaultSubTelephonyManager.createForSubscriptionId(subId);
`


Note that access to some telephony information is
permission-protected. Your application cannot access the protected
information unless it has the appropriate permissions declared in
its manifest file. Where permissions apply, they are noted in the
methods through which you access the protected information.

TelephonyManager is intended for use on devices that implement
`https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY`. On devices
that do not implement this feature, the behavior is not reliable.


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

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/telephony/TelephonyManager.CallComposerException` Exception that may be supplied to the callback in `https://developer.android.com/reference/android/telephony/TelephonyManager#uploadCallComposerPicture(java.io.InputStream,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.os.ParcelUuid,android.telephony.TelephonyManager.CallComposerException>)` if something goes awry. |
| ` class` | `https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback` Callback for providing asynchronous `https://developer.android.com/reference/android/telephony/CellInfo` on request |
| ` class` | `https://developer.android.com/reference/android/telephony/TelephonyManager.ModemErrorException` Exception that is supplied to the callback in `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)` if the modem returned a failure. |
| ` class` | `https://developer.android.com/reference/android/telephony/TelephonyManager.NetworkSlicingException` Exception that may be supplied to the callback in `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)` if something goes awry. |
| ` class` | `https://developer.android.com/reference/android/telephony/TelephonyManager.TimeoutException` Exception that is supplied to the callback in `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)` if the system timed out waiting for a response from the Radio. |
| ` class` | `https://developer.android.com/reference/android/telephony/TelephonyManager.UssdResponseCallback` Used to notify callers of `https://developer.android.com/reference/android/telephony/TelephonyManager#sendUssdRequest(java.lang.String,%20android.telephony.TelephonyManager.UssdResponseCallback,%20android.os.Handler)` when the network either successfully executes a USSD request, or if there was a failure while executing the request. |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_MESSAGING_CLIENT_SERVICE` A service action that identifies a `https://developer.android.com/reference/android/service/carrier/CarrierMessagingClientService` subclass in the AndroidManifest.xml. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE` Broadcast action sent when the availability of the system default network changes. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_PCO_VALUE` Broadcast action sent when a PCO value becomes available from the modem. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_REDIRECTED` Broadcast action sent when a data connection is redirected with validation failure. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED` Broadcast action sent when a data connection setup fails. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_RESET` Broadcast action sent when carrier apps should reset their internal state. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CONFIGURE_VOICEMAIL` Open the voicemail settings activity to make changes to voicemail configuration. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_MULTI_SIM_CONFIG_CHANGED` Broadcast action to be received by Broadcast receivers. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_NETWORK_COUNTRY_CHANGED` Broadcast intent action for network country code changes. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED` Broadcast intent action indicating that the call state on the device has changed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_RESET_MOBILE_NETWORK_SETTINGS` Activity action: Show setting to reset mobile networks. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_RESPOND_VIA_MESSAGE` The Phone app sends this intent when a user opts to respond-via-message during an incoming call. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SECRET_CODE` Broadcast Action: A debug code has been entered in the dialer. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SHOW_VOICEMAIL_NOTIFICATION` Broadcast intent action for letting the default dialer to know to show voicemail notification. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` Broadcast Action: The subscription carrier identity has changed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED` Broadcast Action: The subscription specific carrier identity has changed. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER` To indicate allowed network type change is requested by carrier. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER` To indicate allowed network type change is requested by user. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#APPTYPE_CSIM` UICC application type is CSIM |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#APPTYPE_ISIM` UICC application type is ISIM |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#APPTYPE_RUIM` UICC application type is RUIM |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#APPTYPE_SIM` UICC application type is SIM |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#APPTYPE_UNKNOWN` UICC application type is unknown or not specified |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#APPTYPE_USIM` UICC application type is USIM |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_EAP_AKA` Authentication type for UICC challenge is EAP AKA. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_EAP_SIM` Authentication type for UICC challenge is EAP SIM. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_GBA_BOOTSTRAP` Authentication type for GBA Bootstrap Challenge. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_GBA_NAF_KEY_EXTERNAL` Authentication type for GBA Network Application Functions (NAF) key External Challenge. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_BUSINESS_ONLY` Call composer status **Business Only** from user setting. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_OFF` Call composer status **OFF** from user setting. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_ON` Call composer status **ON** from user setting. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_IDLE` Device call state: No activity. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_OFFHOOK` Device call state: Off-hook. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_RINGING` Device call state: Ringing. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CAPABILITY_SLICING_CONFIG_SUPPORTED` Indicates whether `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)` is supported. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_NOT_RESTRICTED` The device is not restricted to a carrier |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_RESTRICTED` The device is restricted to a carrier. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_RESTRICTED_TO_CALLER` The device is restricted to the carrier of the calling application. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_UNKNOWN` Carrier restriction status value is unknown, in case modem did not provide any information about carrier restriction status. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CDMA_ROAMING_MODE_AFFILIATED` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CDMA_ROAMING_MODE_ANY` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CDMA_ROAMING_MODE_HOME` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#CDMA_ROAMING_MODE_RADIO_DEFAULT` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_DORMANT` Data connection is active, but physical link is down |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_IN` Data connection activity: Currently receiving IP PPP traffic. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_INOUT` Data connection activity: Currently both sending and receiving IP PPP traffic. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_NONE` Data connection activity: No traffic. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_OUT` Data connection activity: Currently sending IP PPP traffic. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_CONNECTED` Data connection state: Connected. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_CONNECTING` Data connection state: Currently setting up a data connection. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_DISCONNECTED` Data connection state: Disconnected. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_DISCONNECTING` Data connection state: Disconnecting. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_CARRIER` To indicate enable or disable carrier data by the system based on carrier signalling or carrier privileged apps. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_OVERRIDE` To indicate data was enabled or disabled due to mobile data policy overrides. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_POLICY` To indicate that data control due to policy. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_THERMAL` To indicate enable or disable data by thermal service. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_UNKNOWN` To indicate that data was enabled or disabled due to an unknown reason. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_USER` To indicate that user enabled or disabled data. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_HANDOVER_IN_PROGRESS` Data connection state: Handover in progress. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_SUSPENDED` Data connection state: Suspended. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_UNKNOWN` Data connection state: Unknown. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#DEFAULT_PORT_INDEX` Default port index for a UICC. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ERI_FLASH` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ERI_OFF` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#ERI_ON` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EVENT_DISPLAY_EMERGENCY_MESSAGE` Event reported from the Telephony stack to indicate that the `https://developer.android.com/reference/android/telecom/Connection` is not able to find any network and likely will not get connected. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_ACTIVE_SIM_SUPPORTED_COUNT` The number of active SIM supported by current multi-SIM config. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_APN_PROTOCOL` An integer extra containing the protocol of the apn connection. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_APN_TYPE` An integer extra containing the APN type. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_CALL_VOICEMAIL_INTENT` The intent to call voicemail. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_CARRIER_ID` An int extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` which indicates the updated carrier id returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_CARRIER_NAME` An string extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` which indicates the updated carrier name of the current subscription. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_DATA_FAIL_CAUSE` An integer extra containing the data fail cause. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_DEFAULT_NETWORK_AVAILABLE` A boolean extra indicating the availability of the default network. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE` Integer extra key used with `https://developer.android.com/reference/android/telephony/TelephonyManager#EVENT_DISPLAY_EMERGENCY_MESSAGE` which indicates the type of handover from emergency call to satellite messaging. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT` Extra key used with the `https://developer.android.com/reference/android/telephony/TelephonyManager#EVENT_DISPLAY_EMERGENCY_MESSAGE` for a `https://developer.android.com/reference/android/app/PendingIntent` which will be launched by the Dialer app. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_HIDE_PUBLIC_SETTINGS` The boolean value indicating whether the voicemail settings activity launched by `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CONFIGURE_VOICEMAIL` should hide settings accessible through public API. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_INCOMING_NUMBER` *This constant was deprecated in API level 29. Companion apps for wearable devices should use the `https://developer.android.com/reference/android/telecom/InCallService` API to retrieve the phone number for calls instead. Apps performing call screening should use the `https://developer.android.com/reference/android/telecom/CallScreeningService` API instead.* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_IS_REFRESH` Boolean value representing whether the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SHOW_VOICEMAIL_NOTIFICATION` is new or a refresh of an existing notification. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_LAST_KNOWN_NETWORK_COUNTRY` The extra used with an `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_NETWORK_COUNTRY_CHANGED` to specify the last known the country code in ISO-3166-1 alpha-2 format. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT` The intent to launch voicemail settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_NETWORK_COUNTRY` The extra used with an `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_NETWORK_COUNTRY_CHANGED` to specify the the country code in ISO-3166-1 alpha-2 format. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_NOTIFICATION_COUNT` The number of voice messages associated with the notification. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PCO_ID` An integer extra indicating the ID for the PCO data. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PCO_VALUE` A byte array extra containing PCO data read from the modem. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PHONE_ACCOUNT_HANDLE` The extra used with an `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CONFIGURE_VOICEMAIL` and `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SHOW_VOICEMAIL_NOTIFICATION` `Intent` to specify the `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` the configuration or notification is for. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_REDIRECTION_URL` String extra containing the redirection URL sent with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_REDIRECTED`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_SPECIFIC_CARRIER_ID` An int extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED` which indicates the updated specific carrier id returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_SPECIFIC_CARRIER_NAME` An string extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED` which indicates the updated specific carrier name returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierIdName()`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` The lookup key used with the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED` broadcast for a String containing the new call state. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_SUBSCRIPTION_ID` An int extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` to indicate the subscription which has changed; or in general whenever a subscription ID needs specified. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_VOICEMAIL_NUMBER` The voicemail number. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_COARSE` Include coarse location data. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_FINE` Include fine location data. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_NONE` Specifies to not include any location related data. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#METADATA_HIDE_VOICEMAIL_SETTINGS_MENU` A boolean meta-data value indicating whether the voicemail settings should be hidden in the call settings page launched by `https://developer.android.com/reference/android/telecom/TelecomManager#ACTION_SHOW_CALL_SETTINGS`. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_ALLOWED` The usage of multiple SIM cards at the same time to register on the network (e.g. Dual Standby or Dual Active) is supported. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_NOT_SUPPORTED_BY_CARRIER` The usage of multiple SIM cards at the same time to register on the network (e.g. Dual Standby or Dual Active) is supported by the hardware, but restricted by the carrier. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_NOT_SUPPORTED_BY_HARDWARE` The usage of multiple SIM cards at the same time to register on the network (e.g. Dual Standby or Dual Active) is not supported by the hardware. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_SELECTION_MODE_AUTO` |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_SELECTION_MODE_MANUAL` |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_SELECTION_MODE_UNKNOWN` |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_1xRTT` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_1xRTT` network type bitmask indicating the support of radio tech 1xRTT. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_CDMA` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EDGE` network type bitmask indicating the support of radio tech EDGE. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EHRPD` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_0` network type bitmask indicating the support of radio tech EVDO 0. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_A` network type bitmask indicating the support of radio tech EVDO A. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_B` network type bitmask indicating the support of radio tech EVDO B. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_GPRS` network type bitmask indicating the support of radio tech GPRS. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_GSM` network type bitmask indicating the support of radio tech GSM. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSDPA` network type bitmask indicating the support of radio tech HSDPA. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSPA` network type bitmask indicating the support of radio tech HSPA. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSPAP` network type bitmask indicating the support of radio tech HSPAP. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSUPA` network type bitmask indicating the support of radio tech HSUPA. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_IWLAN` network type bitmask indicating the support of radio tech IWLAN. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE` network type bitmask indicating the support of radio tech LTE. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE_CA` *This constant was deprecated in API level 34. Please use `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE` instead. Deprecated in Android U.* |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_NR` network type bitmask indicating the support of radio tech NR(New Radio) 5G. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_TD_SCDMA` network type bitmask indicating the support of radio tech TD_SCDMA. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_UMTS` network type bitmask indicating the support of radio tech UMTS. |
| `long` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_UNKNOWN` network type bitmask unknown. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_CDMA` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EDGE` Current network is EDGE |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EHRPD` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_0` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_A` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_B` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GPRS` Current network is GPRS |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GSM` Current network is GSM |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSDPA` Current network is HSDPA |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPA` Current network is HSPA |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPAP` Current network is HSPA+ |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSUPA` Current network is HSUPA |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IDEN` *This constant was deprecated in API level 34. Legacy network type no longer being used starting in Android U.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IWLAN` Current network is IWLAN |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_LTE` Current network is LTE |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_NR` Current network is NR (New Radio) 5G. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_TD_SCDMA` Current network is TD_SCDMA |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UMTS` Current network is UMTS |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UNKNOWN` Network type is unknown |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PHONE_TYPE_CDMA` *This constant was deprecated in API level 36. Legacy CDMA is unsupported.* |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PHONE_TYPE_GSM` Phone radio is GSM. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PHONE_TYPE_NONE` No phone radio. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PHONE_TYPE_SIP` Phone is via SIP. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PREMIUM_CAPABILITY_PRIORITIZE_LATENCY` A premium capability that boosts the network to allow for real-time interactive traffic by prioritizing low latency communication. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_IN_PROGRESS` Purchase premium capability failed because a request was already made and is in progress. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_PURCHASED` Purchase premium capability failed because it is already purchased and available. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_DISABLED` Purchase premium capability failed because the carrier disabled or does not support the capability, as specified in `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_SUPPORTED_PREMIUM_CAPABILITIES_INT_ARRAY`. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_ERROR` Purchase premium capability failed because the carrier app did not indicate success. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ENTITLEMENT_CHECK_FAILED` Purchase premium capability failed because the entitlement check failed. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_FEATURE_NOT_SUPPORTED` Purchase premium capability failed because the device does not support the feature. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_NETWORK_NOT_AVAILABLE` Purchase premium capability failed because the network is not available. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_NOT_DEFAULT_DATA_SUBSCRIPTION` Purchase premium capability failed because the request was not made on the default data subscription, indicated by `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultDataSubscriptionId()`. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_NOT_FOREGROUND` Purchase premium capability failed because the requesting application is not in the foreground. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_PENDING_NETWORK_SETUP` Purchase premium capability was successful and is waiting for the network to setup the slicing configuration. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_REQUEST_FAILED` Purchase premium capability failed because the telephony service is unavailable or there was an error in the phone process. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_SUCCESS` Purchase premium capability request was successful. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED` Purchase premium capability failed because the request is throttled. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_TIMEOUT` Purchase premium capability failed because we did not receive a response from the user for the performance boost notification within the time specified by `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_PREMIUM_CAPABILITY_NOTIFICATION_DISPLAY_TIMEOUT_MILLIS_LONG`. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_CANCELED` Purchase premium capability failed because the user canceled the operation. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED` Purchase premium capability failed because the user disabled the feature. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SET_OPPORTUNISTIC_SUB_INACTIVE_SUBSCRIPTION` The subscription is not valid. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SET_OPPORTUNISTIC_SUB_NO_OPPORTUNISTIC_SUB_AVAILABLE` The subscription is not valid. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SET_OPPORTUNISTIC_SUB_REMOTE_SERVICE_EXCEPTION` Subscription service happened remote exception. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SET_OPPORTUNISTIC_SUB_SUCCESS` No error. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SET_OPPORTUNISTIC_SUB_VALIDATION_FAILED` Validation failed when trying to switch to preferred subscription. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_ABSENT` SIM card state: no SIM card is available in the device |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_IO_ERROR` SIM card state: SIM Card Error, present but faulty |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_RESTRICTED` SIM card state: SIM Card restricted, present but not usable due to carrier restrictions. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NETWORK_LOCKED` SIM card state: Locked: requires a network PIN to unlock |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NOT_READY` SIM card state: SIM Card is NOT READY |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PERM_DISABLED` SIM card state: SIM Card Error, permanently disabled |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PIN_REQUIRED` SIM card state: Locked: requires the user's SIM PIN to unlock |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PUK_REQUIRED` SIM card state: Locked: requires the user's SIM PUK to unlock |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_READY` SIM card state: Ready |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_UNKNOWN` SIM card state: Unknown. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#TTY_MODE_FULL` TTY (teletypewriter) mode is on. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#TTY_MODE_HCO` TTY (teletypewriter) mode is in hearing carryover mode (HCO). |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#TTY_MODE_OFF` TTY (teletypewriter) mode is off. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#TTY_MODE_VCO` TTY (teletypewriter) mode is in voice carryover mode (VCO). |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UNINITIALIZED_CARD_ID` A UICC card identifier used before the UICC card is loaded. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID` An unknown carrier id. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UNSUPPORTED_CARD_ID` A UICC card identifier used if the device does not support the operation. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_ABORTED` The request is aborted. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_DISABLE_MODEM_FAIL` Disable modem fail. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_ENABLE_MODEM_FAIL` Enable modem fail. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_INVALID_ARGUMENTS` The parameter passed in is invalid. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_MULTIPLE_NETWORKS_NOT_SUPPORTED` Carrier app does not support multiple available networks. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_NO_CARRIER_PRIVILEGE` No carrier privilege. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_NO_OPPORTUNISTIC_SUB_AVAILABLE` The subscription is not valid. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_REMOTE_SERVICE_EXCEPTION` There is no OpportunisticNetworkService. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_SERVICE_IS_DISABLED` OpportunisticNetworkService is disabled. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_SIM_PORT_NOT_AVAILABLE` SIM port is not available to switch to opportunistic subscription. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_SUCCESS` No error. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_UNKNOWN_FAILURE` There is a unknown failure happened. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#USSD_ERROR_NOT_ALLOWED` Failure code returned when a USSD request has failed to execute because the calling app is not allowed to send USSD requests. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#USSD_ERROR_SERVICE_UNAVAIL` Failure code returned when a USSD request has failed to execute because the Telephony service is unavailable. |
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#USSD_RETURN_FAILURE` Failed code returned when the mobile network has failed to complete a USSD request. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#VVM_TYPE_CVVM` A flavor of OMTP protocol with a different mobile originated (MO) format |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#VVM_TYPE_OMTP` The OMTP protocol. |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_IDLE` Value used with `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` corresponding to `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_IDLE`. |
| ` public static final https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_OFFHOOK` Value used with `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` corresponding to `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_OFFHOOK`. |
| ` public static final https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_RINGING` Value used with `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` corresponding to `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_RINGING`. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#canChangeDtmfToneLength()() ` Whether the device supports configuring the DTMF tone length. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#clearSignalStrengthUpdateRequest(android.telephony.SignalStrengthUpdateRequest)(https://developer.android.com/reference/android/telephony/SignalStrengthUpdateRequest request) ` Clear a `https://developer.android.com/reference/android/telephony/SignalStrengthUpdateRequest` from the system. |
| ` https://developer.android.com/reference/android/telephony/TelephonyManager` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#createForPhoneAccountHandle(android.telecom.PhoneAccountHandle)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle phoneAccountHandle) ` Create a new TelephonyManager object pinned to the subscription ID associated with the given phone account. |
| ` https://developer.android.com/reference/android/telephony/TelephonyManager` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)(int subId) ` Create a new TelephonyManager object pinned to the given subscription ID. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#doesSwitchMultiSimConfigTriggerReboot()() ` Get whether making changes to modem configurations by `https://developer.android.com/reference/android/telephony/TelephonyManager#switchMultiSimConfig(int)` will trigger device reboot. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getActiveModemCount()() ` Returns the number of logical modems currently configured to be activated. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/CellInfo>` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getAllCellInfo()() ` Requests all available cell information from all radios on the device including the camped/registered, serving, and neighboring cells. |
| ` long` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getAllowedNetworkTypesForReason(int)(int reason) ` Get the allowed network types for certain reason. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCallComposerStatus()() ` Get the user-set status for enriched calling with call composer. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCallState()() ` *This method was deprecated in API level 31. Use `https://developer.android.com/reference/android/telephony/TelephonyManager#getCallStateForSubscription()` to retrieve the call state for a specific telephony subscription (which allows carrier privileged apps), `https://developer.android.com/reference/android/telephony/TelephonyCallback.CallStateListener` for real-time call state updates, or `https://developer.android.com/reference/android/telecom/TelecomManager#isInCall()`, which supplies an aggregate "in call" state for the entire device.* |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCallStateForSubscription()() ` Retrieve the call state for a specific subscription that was specified when this TelephonyManager instance was created. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCardIdForDefaultEuicc()() ` Get the card ID of the default eUICC card. |
| ` https://developer.android.com/reference/android/os/PersistableBundle` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCarrierConfig()() ` Returns the carrier config of the subscription ID pinned to the TelephonyManager. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCarrierIdFromSimMccMnc()() ` Returns carrier id based on sim MCCMNC (returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimOperator()`) only. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCarrierRestrictionStatus(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> resultListener) ` Get the carrier restriction status of the device. |
| ` https://developer.android.com/reference/android/telephony/CellLocation` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCellLocation()() ` *This method was deprecated in API level 26. use `https://developer.android.com/reference/android/telephony/TelephonyManager#getAllCellInfo()` instead, which returns a superset of this API.* |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getCurrentTtyMode()() ` Returns the current TTY mode of the device. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getDataActivity()() ` Returns a constant indicating the type of activity on a data connection (cellular). |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getDataNetworkType()() ` Returns a constant indicating the radio technology (network type) currently in use on the device for data transmission. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getDataState()() ` Returns a constant indicating the current data connection state (cellular). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getDeviceId()() ` *This method was deprecated in API level 26. Use `https://developer.android.com/reference/android/telephony/TelephonyManager#getImei()` which returns IMEI for GSM or `https://developer.android.com/reference/android/telephony/TelephonyManager#getMeid()` which returns MEID for CDMA.* |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getDeviceId(int)(int slotIndex) ` *This method was deprecated in API level 26. Use `https://developer.android.com/reference/android/telephony/TelephonyManager#getImei()` which returns IMEI for GSM or `https://developer.android.com/reference/android/telephony/TelephonyManager#getMeid()` which returns MEID for CDMA.* |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getDeviceSoftwareVersion()() ` Returns the software version number for the device, for example, the IMEI/SV for GSM phones. |
| ` https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/Integer, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber>>` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getEmergencyNumberList()() ` Get the emergency number list based on current locale, sim, default, modem and network. |
| ` https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/Integer, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber>>` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getEmergencyNumberList(int)(int categories) ` Get the per-category emergency number list based on current locale, sim, default, modem and network. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getEquivalentHomePlmns()() ` Returns a list of the equivalent home PLMNs (EF_EHPLMN) from the USIM app. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getForbiddenPlmns()() ` Returns an array of Forbidden PLMNs from the USIM App Returns null if the query fails. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getGroupIdLevel1()() ` Returns the Group Identifier Level1 for a GSM phone. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getIccAuthentication(int,%20int,%20java.lang.String)(int appType, int authType, https://developer.android.com/reference/java/lang/String data) ` Returns the response of authentication for the default subscription. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getImei(int)(int slotIndex) ` Returns the IMEI (International Mobile Equipment Identity). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getImei()() ` Returns the IMEI (International Mobile Equipment Identity). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getLine1Number()() ` *This method was deprecated in API level 33. use `https://developer.android.com/reference/android/telephony/SubscriptionManager#getPhoneNumber(int)` instead.* |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getManualNetworkSelectionPlmn()() ` Get the PLMN chosen for Manual Network Selection if active. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getManufacturerCode(int)(int slotIndex) ` *This method was deprecated in API level 36. Legacy CDMA is unsupported.* |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getManufacturerCode()() ` *This method was deprecated in API level 36. Legacy CDMA is unsupported.* |
| ` static long` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getMaximumCallComposerPictureSize()() ` Indicates the maximum size of the call composure picture. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getMeid()() ` *This method was deprecated in API level 36. Legacy CDMA is unsupported.* |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getMeid(int)(int slotIndex) ` *This method was deprecated in API level 36. Legacy CDMA is unsupported.* |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getMmsUAProfUrl()() ` Returns the MMS user agent profile URL. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getMmsUserAgent()() ` Returns the MMS user agent. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNai()() ` Returns the Network Access Identifier (NAI). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkCountryIso()() ` Returns the ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) of the current registered operator or the cell nearby, if available. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkCountryIso(int)(int slotIndex) ` Returns the ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) of the current registered operator or the cell nearby, if available. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkOperator()() ` Returns the numeric name (MCC+MNC) of current registered operator. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkOperatorName()() ` Returns the alphabetic name of current registered operator. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSelectionMode()() ` Get the network selection mode. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/telephony/data/NetworkSlicingConfig, https://developer.android.com/reference/android/telephony/TelephonyManager.NetworkSlicingException> callback) ` Request to get the current slicing configuration including URSP rules and NSSAIs (configured, allowed and rejected). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSpecifier()() ` Returns the network specifier of the subscription ID pinned to the TelephonyManager. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkType()() ` *This method was deprecated in API level 30. use `https://developer.android.com/reference/android/telephony/TelephonyManager#getDataNetworkType()`* |
| ` https://developer.android.com/reference/android/telecom/PhoneAccountHandle` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getPhoneAccountHandle()() ` Determines the `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` associated with this TelephonyManager. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getPhoneCount()() ` *This method was deprecated in API level 30. Use `https://developer.android.com/reference/android/telephony/TelephonyManager#getActiveModemCount()` instead.* |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getPhoneType()() ` Returns a constant indicating the device phone type. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getPreferredOpportunisticDataSubscription()() ` Get preferred opportunistic data subscription Id Requires that the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`), or has either READ_PRIVILEGED_PHONE_STATE or `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` permission. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getPrimaryImei()() ` Returns the primary IMEI (International Mobile Equipment Identity) of the device as mentioned in GSMA TS.37. |
| ` https://developer.android.com/reference/android/telephony/ServiceState` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getServiceState(int)(int includeLocationData) ` Returns the current `https://developer.android.com/reference/android/telephony/ServiceState` information. |
| ` https://developer.android.com/reference/android/telephony/ServiceState` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getServiceState()() ` Returns the current `https://developer.android.com/reference/android/telephony/ServiceState` information. |
| ` https://developer.android.com/reference/android/telephony/ServiceState` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getServiceStateForSlot(int)(int slotIndex) ` Returns the service state information on specified SIM slot. |
| ` https://developer.android.com/reference/android/telephony/SignalStrength` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSignalStrength()() ` Get the most recently available signal strength information. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()() ` Returns carrier id of the current subscription. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierIdName()() ` Returns carrier id name of the current subscription. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCountryIso()() ` Returns the ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimOperator()() ` Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimOperatorName()() ` Returns the Service Provider Name (SPN). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSerialNumber()() ` Returns the serial number of the SIM, if applicable. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()() ` Returns fine-grained carrier ID of the current subscription. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierIdName()() ` Similar like `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierIdName()`, returns user-facing name of the specific carrier id returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimState()() ` Returns a constant indicating the state of the default SIM card. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSimState(int)(int slotIndex) ` Returns a constant indicating the state of the device SIM card in a logical slot. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSubscriberId()() ` Returns the unique subscriber ID, for example, the IMSI for a GSM phone. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSubscriptionId(android.telecom.PhoneAccountHandle)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle phoneAccountHandle) ` Returns the subscription ID for the given phone account handle. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSubscriptionId()() ` Return an appropriate subscription ID for any situation. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSupportedModemCount()() ` Return how many logical modem can be potentially active simultaneously, in terms of hardware capability. |
| ` long` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getSupportedRadioAccessFamily()() ` Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getTypeAllocationCode()() ` Returns the Type Allocation Code from the IMEI. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getTypeAllocationCode(int)(int slotIndex) ` Returns the Type Allocation Code from the IMEI. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/UiccCardInfo>` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getUiccCardsInfo()() ` Gets information about currently inserted UICCs (Universal Integrated Circuit Cards) and eUICCs (embedded UICCs). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getVisualVoicemailPackageName()() ` Returns the package responsible of processing visual voicemail for the subscription ID pinned to the TelephonyManager. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getVoiceMailAlphaTag()() ` Retrieves the alphabetic identifier associated with the voice mail number. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getVoiceMailNumber()() ` Returns the voice mail number. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getVoiceNetworkType()() ` Returns the NETWORK_TYPE_xxxx for voice Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE` or that the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`). |
| ` https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle accountHandle) ` Returns the URI for the per-account voicemail ringtone set in Phone settings. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()() ` Has the calling application been granted carrier privileges by the carrier. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#hasIccCard()() ` This API is used to check if there is an ICC card present in the device. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#iccCloseLogicalChannel(int)(int channel) ` Closes a previously opened logical channel to the ICC card. |
| ` byte[]` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#iccExchangeSimIO(int,%20int,%20int,%20int,%20int,%20java.lang.String)(int fileID, int command, int p1, int p2, int p3, https://developer.android.com/reference/java/lang/String filePath) ` Returns the response APDU for a command APDU sent through SIM_IO. |
| ` https://developer.android.com/reference/android/telephony/IccOpenLogicalChannelResponse` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#iccOpenLogicalChannel(java.lang.String,%20int)(https://developer.android.com/reference/java/lang/String AID, int p2) ` Opens a logical channel to the ICC card. |
| ` https://developer.android.com/reference/android/telephony/IccOpenLogicalChannelResponse` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#iccOpenLogicalChannel(java.lang.String)(https://developer.android.com/reference/java/lang/String AID) ` *This method was deprecated in API level 26. Replaced by `https://developer.android.com/reference/android/telephony/TelephonyManager#iccOpenLogicalChannel(java.lang.String,%20int)`* |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#iccTransmitApduBasicChannel(int,%20int,%20int,%20int,%20int,%20java.lang.String)(int cla, int instruction, int p1, int p2, int p3, https://developer.android.com/reference/java/lang/String data) ` Transmit an APDU to the ICC card over the basic channel. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#iccTransmitApduLogicalChannel(int,%20int,%20int,%20int,%20int,%20int,%20java.lang.String)(int channel, int cla, int instruction, int p1, int p2, int p3, https://developer.android.com/reference/java/lang/String data) ` Transmit an APDU to the ICC card over a logical channel. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isConcurrentVoiceAndDataSupported()() ` Whether the device is currently on a technology (e.g. UMTS or LTE) which can support voice and data simultaneously. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isDataCapable()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isDataConnectionAllowed()() ` Checks whether cellular data connection is allowed in the device. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isDataEnabled()() ` Returns whether mobile data is enabled or not per user setting. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isDataEnabledForReason(int)(int reason) ` Return whether data is enabled for certain reason . |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isDataRoamingEnabled()() ` Returns whether mobile data roaming is enabled on the subscription. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceSmsCapable()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceVoiceCapable()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isEmergencyNumber(java.lang.String)(https://developer.android.com/reference/java/lang/String number) ` Identifies if the supplied phone number is an emergency number that matches a known emergency number based on current locale, SIM card(s), Android database, modem, network, or defaults. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isHearingAidCompatibilitySupported()() ` Whether the phone supports hearing aid compatibility. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isManualNetworkSelectionAllowed()() ` Checks if manual network selection is allowed. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isModemEnabledForSlot(int)(int slotIndex) ` Indicates whether or not there is a modem stack enabled for the given SIM slot. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isMultiSimSupported()() ` Returns if the usage of multiple SIM cards at the same time to register on the network (e.g. Dual Standby or Dual Active) is supported by the device and by the carrier. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isNetworkRoaming()() ` Returns true if the device is considered roaming on the current network, for GSM purposes. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isPremiumCapabilityAvailableForPurchase(int)(int capability) ` Check whether the given premium capability is available for purchase from the carrier. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isRadioInterfaceCapabilitySupported(java.lang.String)(https://developer.android.com/reference/java/lang/String capability) ` Whether the device supports a given capability on the radio interface. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isRttSupported()() ` Determines whether the device currently supports RTT (Real-time text). |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isSmsCapable()() ` *This method was deprecated in API level 35. Replaced by `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceSmsCapable()`. Starting from Android 15, SMS capability may also be overridden by carriers for a given subscription. For SMS capable device (when `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceSmsCapable()` return `true`), caller should check for subscription-level SMS capability as well. See `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceSmsCapable()` for details.* |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isTtyModeSupported()() ` *This method was deprecated in API level 28. Use `https://developer.android.com/reference/android/telecom/TelecomManager#isTtySupported()` instead Whether the phone supports TTY mode.* |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isVoiceCapable()() ` *This method was deprecated in API level 35. Replaced by `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceVoiceCapable()`. Starting from Android 15, voice capability may also be overridden by carriers for a given subscription. For voice capable device (when `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceVoiceCapable()` return `true`), caller should check for subscription-level voice capability as well. See `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceVoiceCapable()` for details.* |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle accountHandle) ` Returns whether vibration is set for voicemail notification in Phone settings. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#isWorldPhone()() ` Whether the device is a world phone. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#listen(android.telephony.PhoneStateListener,%20int)(https://developer.android.com/reference/android/telephony/PhoneStateListener listener, int events) ` *This method was deprecated in API level 31. Use `https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)`.* |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#purchasePremiumCapability(int,%20java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Integer>)(int capability, 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> callback) ` Purchase the given premium capability from the carrier. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#rebootModem()() ` Reboot and re-initialize the cellular modem and related subsystems below the OS. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/TelephonyCallback callback) ` Registers a callback object to receive notification of changes in specified telephony states. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(int,%20java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)(int includeLocationData, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/TelephonyCallback callback) ` Registers a callback object to receive notification of changes in specified telephony states. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/TelephonyManager.CellInfoCallback callback) ` Requests all available cell information from the current subscription for observed camped/registered, serving, and neighboring cells. |
| ` https://developer.android.com/reference/android/telephony/NetworkScan` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#requestNetworkScan(android.telephony.NetworkScanRequest,%20java.util.concurrent.Executor,%20android.telephony.TelephonyScanManager.NetworkScanCallback)(https://developer.android.com/reference/android/telephony/NetworkScanRequest request, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/TelephonyScanManager.NetworkScanCallback callback) ` Request a network scan. |
| ` https://developer.android.com/reference/android/telephony/NetworkScan` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#requestNetworkScan(int,%20android.telephony.NetworkScanRequest,%20java.util.concurrent.Executor,%20android.telephony.TelephonyScanManager.NetworkScanCallback)(int includeLocationData, https://developer.android.com/reference/android/telephony/NetworkScanRequest request, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/TelephonyScanManager.NetworkScanCallback callback) ` Request a network scan. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#sendDialerSpecialCode(java.lang.String)(https://developer.android.com/reference/java/lang/String inputCode) ` Send the special dialer code. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#sendEnvelopeWithStatus(java.lang.String)(https://developer.android.com/reference/java/lang/String content) ` Send ENVELOPE to the SIM and return the response. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#sendUssdRequest(java.lang.String,%20android.telephony.TelephonyManager.UssdResponseCallback,%20android.os.Handler)(https://developer.android.com/reference/java/lang/String ussdRequest, https://developer.android.com/reference/android/telephony/TelephonyManager.UssdResponseCallback callback, https://developer.android.com/reference/android/os/Handler handler) ` Sends an Unstructured Supplementary Service Data (USSD) request to the mobile network and informs the caller of the response via the supplied `callback`. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#sendVisualVoicemailSms(java.lang.String,%20int,%20java.lang.String,%20android.app.PendingIntent)(https://developer.android.com/reference/java/lang/String number, int port, https://developer.android.com/reference/java/lang/String text, https://developer.android.com/reference/android/app/PendingIntent sentIntent) ` Send a visual voicemail SMS. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setAllowedNetworkTypesForReason(int,%20long)(int reason, long allowedNetworkTypes) ` Set the allowed network types of the device and provide the reason triggering the allowed network change. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setCallComposerStatus(int)(int status) ` Set the user-set status for enriched calling with call composer. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setDataEnabled(boolean)(boolean enable) ` *This method was deprecated in API level 31. use setDataEnabledForReason with reason DATA_ENABLED_REASON_USER instead.* |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setDataEnabledForReason(int,%20boolean)(int reason, boolean enabled) ` Control of data connection and provide the reason triggering the data connection control. |
| ` int` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setForbiddenPlmns(java.util.List<java.lang.String>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String> fplmns) ` Replace the contents of the forbidden PLMN SIM file with the provided values. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setLine1NumberForDisplay(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String alphaTag, https://developer.android.com/reference/java/lang/String number) ` *This method was deprecated in API level 33. use `https://developer.android.com/reference/android/telephony/SubscriptionManager#setCarrierPhoneNumber(int,%20java.lang.String)` instead.* |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setNetworkSelectionModeAutomatic()() ` Sets the network selection mode to automatic. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setNetworkSelectionModeManual(java.lang.String,%20boolean,%20int)(https://developer.android.com/reference/java/lang/String operatorNumeric, boolean persistSelection, int ran) ` Ask the radio to connect to the input network and change selection mode to manual. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setNetworkSelectionModeManual(java.lang.String,%20boolean)(https://developer.android.com/reference/java/lang/String operatorNumeric, boolean persistSelection) ` Ask the radio to connect to the input network and change selection mode to manual. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setOperatorBrandOverride(java.lang.String)(https://developer.android.com/reference/java/lang/String brand) ` Override the branding for the current ICCID. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setPreferredNetworkTypeToGlobal()() ` Set the preferred network type to global mode which includes NR, LTE, CDMA, EvDo and GSM/WCDMA. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setPreferredOpportunisticDataSubscription(int,%20boolean,%20java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Integer>)(int subId, boolean needValidation, 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> callback) ` Set preferred opportunistic data subscription id. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setSignalStrengthUpdateRequest(android.telephony.SignalStrengthUpdateRequest)(https://developer.android.com/reference/android/telephony/SignalStrengthUpdateRequest request) ` Set a `https://developer.android.com/reference/android/telephony/SignalStrengthUpdateRequest` to receive notification when signal quality measurements breach the specified thresholds. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)(https://developer.android.com/reference/android/telephony/VisualVoicemailSmsFilterSettings settings) ` Set the visual voicemail SMS filter settings for the subscription ID pinned to the TelephonyManager. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setVoiceMailNumber(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String alphaTag, https://developer.android.com/reference/java/lang/String number) ` Sets the voice mail number. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setVoicemailRingtoneUri(android.telecom.PhoneAccountHandle,%20android.net.Uri)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle phoneAccountHandle, https://developer.android.com/reference/android/net/Uri uri) ` *This method was deprecated in API level 28. Use `https://developer.android.com/reference/android/provider/Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS` instead.* |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#setVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle,%20boolean)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle phoneAccountHandle, boolean enabled) ` *This method was deprecated in API level 28. Use `https://developer.android.com/reference/android/provider/Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS` instead.* |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#switchMultiSimConfig(int)(int numOfSims) ` Switch configs to enable multi-sim or switch back to single-sim Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` or that the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`). |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#unregisterTelephonyCallback(android.telephony.TelephonyCallback)(https://developer.android.com/reference/android/telephony/TelephonyCallback callback) ` Unregister an existing `https://developer.android.com/reference/android/telephony/TelephonyCallback`. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#updateAvailableNetworks(java.util.List<android.telephony.AvailableNetworkInfo>,%20java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Integer>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/AvailableNetworkInfo> availableNetworks, 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> callback) ` Update availability of a list of networks in the current location. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#uploadCallComposerPicture(java.io.InputStream,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.os.ParcelUuid,android.telephony.TelephonyManager.CallComposerException>)(https://developer.android.com/reference/java/io/InputStream pictureToUpload, https://developer.android.com/reference/java/lang/String contentType, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/os/ParcelUuid, https://developer.android.com/reference/android/telephony/TelephonyManager.CallComposerException> callback) ` Uploads a picture to the carrier network for use with call composer. |
| ` void` | ` https://developer.android.com/reference/android/telephony/TelephonyManager#uploadCallComposerPicture(java.nio.file.Path,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.os.ParcelUuid,android.telephony.TelephonyManager.CallComposerException>)(https://developer.android.com/reference/java/nio/file/Path pictureToUpload, https://developer.android.com/reference/java/lang/String contentType, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/os/ParcelUuid, https://developer.android.com/reference/android/telephony/TelephonyManager.CallComposerException> callback) ` Uploads a picture to the carrier network for use with call composer. |

### 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_CARRIER_MESSAGING_CLIENT_SERVICE

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

```
public static final String ACTION_CARRIER_MESSAGING_CLIENT_SERVICE
```

A service action that identifies
a `https://developer.android.com/reference/android/service/carrier/CarrierMessagingClientService` subclass in the
AndroidManifest.xml.

See `https://developer.android.com/reference/android/service/carrier/CarrierMessagingClientService` for the details.

<br />

Constant Value:

"android.telephony.action.CARRIER_MESSAGING_CLIENT_SERVICE"


### ACTION_CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE

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

```
public static final String ACTION_CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE
```

Broadcast action sent when the availability of the system default network changes.

<br />

**See also:**

- `https://developer.android.com/reference/android/net/ConnectivityManager#registerDefaultNetworkCallback(android.net.ConnectivityManager.NetworkCallback)`

Constant Value:

"android.telephony.action.CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE"


### ACTION_CARRIER_SIGNAL_PCO_VALUE

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

```
public static final String ACTION_CARRIER_SIGNAL_PCO_VALUE
```

Broadcast action sent when a PCO value becomes available from the modem.

This action is intended for sim/account status checks and only sent to the carrier apps
specified in the carrier config for the subscription ID that's attached to this intent.

The intent will have the following extra values:

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_APN_TYPE`
An integer indicating the apn type.
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_APN_PROTOCOL`
An integer indicating the protocol of the apn connection
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PCO_ID`
An integer indicating the PCO id for the data.
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PCO_VALUE`
A byte array of PCO data read from modem.
- `https://developer.android.com/reference/android/telephony/SubscriptionManager#EXTRA_SUBSCRIPTION_INDEX`
The subscription ID for which the PCO info was received.

This is a protected intent that can only be sent by the system.

<br />

<br />

Constant Value:

"android.telephony.action.CARRIER_SIGNAL_PCO_VALUE"


### ACTION_CARRIER_SIGNAL_REDIRECTED

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

```
public static final String ACTION_CARRIER_SIGNAL_REDIRECTED
```

Broadcast action sent when a data connection is redirected with validation failure.

This action is intended for sim/account status checks and only sent to the carrier apps
specified in the carrier config for the subscription ID that's attached to this intent.

The intent will have the following extra values:

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_APN_TYPE`
An integer indicating the apn type.
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_REDIRECTION_URL`
A string indicating the redirection url
- `https://developer.android.com/reference/android/telephony/SubscriptionManager#EXTRA_SUBSCRIPTION_INDEX`
The subscription ID on which the validation failure happened.

This is a protected intent that can only be sent by the system.

<br />

<br />

Constant Value:

"android.telephony.action.CARRIER_SIGNAL_REDIRECTED"


### ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED

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

```
public static final String ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED
```

Broadcast action sent when a data connection setup fails.

This action is intended for sim/account status checks and only sent to the carrier apps
specified in the carrier config for the subscription ID that's attached to this intent.

The intent will have the following extra values:

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_APN_TYPE`
An integer indicating the apn type.
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_DATA_FAIL_CAUSE`
A integer indicating the data fail cause.
- `https://developer.android.com/reference/android/telephony/SubscriptionManager#EXTRA_SUBSCRIPTION_INDEX`
The subscription ID on which the data setup failure happened.

This is a protected intent that can only be sent by the system.

<br />

<br />

Constant Value:

"android.telephony.action.CARRIER_SIGNAL_REQUEST_NETWORK_FAILED"


### ACTION_CARRIER_SIGNAL_RESET

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

```
public static final String ACTION_CARRIER_SIGNAL_RESET
```

Broadcast action sent when carrier apps should reset their internal state.

Sent when certain events such as turning on/off mobile data, removing the SIM, etc. require
carrier apps to reset their state.

This action is intended to signal carrier apps to perform cleanup operations. It is only sent
to the carrier apps specified in the carrier config for the subscription ID attached to
this intent.

The intent will have the following extra values:

- `https://developer.android.com/reference/android/telephony/SubscriptionManager#EXTRA_SUBSCRIPTION_INDEX`
The subscription ID for which state should be reset.

This is a protected intent that can only be sent by the system.

<br />

<br />

Constant Value:

"android.telephony.action.CARRIER_SIGNAL_RESET"


### ACTION_CONFIGURE_VOICEMAIL

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

```
public static final String ACTION_CONFIGURE_VOICEMAIL
```

Open the voicemail settings activity to make changes to voicemail configuration.


The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PHONE_ACCOUNT_HANDLE` extra indicates which `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` to
configure voicemail.
The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_HIDE_PUBLIC_SETTINGS` hides settings the dialer will modify through public
API if set.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PHONE_ACCOUNT_HANDLE`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_HIDE_PUBLIC_SETTINGS`

Constant Value:

"android.telephony.action.CONFIGURE_VOICEMAIL"


### ACTION_MULTI_SIM_CONFIG_CHANGED

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

```
public static final String ACTION_MULTI_SIM_CONFIG_CHANGED
```

Broadcast action to be received by Broadcast receivers.

Indicates multi-SIM configuration is changed. For example, it changed
from single SIM capable to dual-SIM capable (DSDS or DSDA) or triple-SIM mode.

It doesn't indicate how many subscriptions are actually active, or which states SIMs are,
or that all steps during multi-SIM change are done. To know those information you still need
to listen to SIM_STATE changes or active subscription changes.

See extra of `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_ACTIVE_SIM_SUPPORTED_COUNT` for updated value.

<br />

Constant Value:

"android.telephony.action.MULTI_SIM_CONFIG_CHANGED"


### ACTION_NETWORK_COUNTRY_CHANGED

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

```
public static final String ACTION_NETWORK_COUNTRY_CHANGED
```

Broadcast intent action for network country code changes.


The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_NETWORK_COUNTRY` extra indicates the country code of the current
network returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkCountryIso()`.

There may be a delay of several minutes before reporting that no country is detected.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_NETWORK_COUNTRY`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkCountryIso()`

Constant Value:

"android.telephony.action.NETWORK_COUNTRY_CHANGED"


### ACTION_PHONE_STATE_CHANGED

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

```
public static final String ACTION_PHONE_STATE_CHANGED
```

Broadcast intent action indicating that the call state
on the device has changed.


The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` extra indicates the new call state.
If a receiving app has `https://developer.android.com/reference/android/Manifest.permission#READ_CALL_LOG` permission, a second
extra `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_INCOMING_NUMBER` provides the phone number for incoming and outgoing
calls as a String.


If the receiving app has
`https://developer.android.com/reference/android/Manifest.permission#READ_CALL_LOG` and
`https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` permission, it will receive the
broadcast twice; one with the `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_INCOMING_NUMBER` populated with the phone number,
and another with it blank. Due to the nature of broadcasts, you cannot assume the order
in which these broadcasts will arrive, however you are guaranteed to receive two in this
case. Apps which are interested in the `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_INCOMING_NUMBER` can ignore the
broadcasts where `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_INCOMING_NUMBER` is not present in the extras (e.g. where
`https://developer.android.com/reference/android/content/Intent#hasExtra(java.lang.String)` returns `false`).


This was a `https://developer.android.com/reference/android/content/Context#sendStickyBroadcast(android.content.Intent)`
broadcast in version 1.0, but it is no longer sticky.
Instead, use `https://developer.android.com/reference/android/telephony/TelephonyManager#getCallState()` to synchronously query the current call state.


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

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_INCOMING_NUMBER`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#getCallState()`

Constant Value:

"android.intent.action.PHONE_STATE"


### ACTION_RESET_MOBILE_NETWORK_SETTINGS

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

```
public static final String ACTION_RESET_MOBILE_NETWORK_SETTINGS
```

Activity action: Show setting to reset mobile networks.

On devices with a settings activity to reset mobile networks, the activity should be
launched without additional permissions.

On some devices, this settings activity may not exist. Callers should ensure that this
case is appropriately handled.

<br />

Constant Value:

"android.telephony.action.RESET_MOBILE_NETWORK_SETTINGS"


### ACTION_RESPOND_VIA_MESSAGE

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

```
public static final String ACTION_RESPOND_VIA_MESSAGE
```

The Phone app sends this intent when a user opts to respond-via-message during an incoming
call. By default, the device's default SMS app consumes this message and sends a text message
to the caller. A third party app can also provide this functionality by consuming this Intent
with a `https://developer.android.com/reference/android/app/Service` and sending the message using its own messaging system.

The intent contains a URI (available from `https://developer.android.com/reference/android/content/Intent#getData()`)
describing the recipient, using either the `sms:`, `smsto:`, `mms:`,
or `mmsto:` URI schema. Each of these URI schema carry the recipient information the
same way: the path part of the URI contains the recipient's phone number or a comma-separated
set of phone numbers if there are multiple recipients. For example, `smsto:2065551234`.

The intent may also contain extras for the message text (in `https://developer.android.com/reference/android/content/Intent#EXTRA_TEXT`) and a message subject
(in `https://developer.android.com/reference/android/content/Intent#EXTRA_SUBJECT`).

**Note:**
The intent-filter that consumes this Intent needs to be in a `https://developer.android.com/reference/android/app/Service`
that requires the
permission `https://developer.android.com/reference/android/Manifest.permission#SEND_RESPOND_VIA_MESSAGE`.

For example, the service that receives this intent can be declared in the manifest file
with an intent filter like this:

```
<!-- Service that delivers SMS messages received from the phone "quick response" -->
<service android:name=".HeadlessSmsSendService"
         android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"
         android:exported="true" >
  <intent-filter>
    <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="sms" />
    <data android:scheme="smsto" />
    <data android:scheme="mms" />
    <data android:scheme="mmsto" />
  </intent-filter>
</service>
```


Output: nothing.

<br />

Constant Value:

"android.intent.action.RESPOND_VIA_MESSAGE"


### ACTION_SECRET_CODE

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

```
public static final String ACTION_SECRET_CODE
```

Broadcast Action: A debug code has been entered in the dialer.


This intent is broadcast by the system and OEM telephony apps may need to receive these
broadcasts. And it requires the sender to be default dialer or has carrier privileges
(see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).


These "secret codes" are used to activate developer menus by dialing certain codes.
And they are of the form `*#*#<code>#*#*`. The intent will have the data
URI: `android_secret_code://<code>`. It is possible that a manifest
receiver would be woken up even if it is not currently running.


It is supposed to replace `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SECRET_CODE_ACTION`
in the next Android version.
Before that both of these two actions will be broadcast.

<br />

Constant Value:

"android.telephony.action.SECRET_CODE"


### ACTION_SHOW_VOICEMAIL_NOTIFICATION

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

```
public static final String ACTION_SHOW_VOICEMAIL_NOTIFICATION
```

Broadcast intent action for letting the default dialer to know to show voicemail
notification.


The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PHONE_ACCOUNT_HANDLE` extra indicates which `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` the
voicemail is received on.
The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_NOTIFICATION_COUNT` extra indicates the total numbers of unheard
voicemails.
The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_VOICEMAIL_NUMBER` extra indicates the voicemail number if available.
The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_CALL_VOICEMAIL_INTENT` extra is a `https://developer.android.com/reference/android/app/PendingIntent` that
will call the voicemail number when sent. This extra will be empty if the voicemail number
is not set, and `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT` will be set instead.
The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT` extra is a
`https://developer.android.com/reference/android/app/PendingIntent` that will launch the voicemail settings. This extra is only
available when the voicemail number is not set.
The `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_IS_REFRESH` extra indicates whether the notification is a refresh or a new
notification.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_PHONE_ACCOUNT_HANDLE`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_NOTIFICATION_COUNT`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_VOICEMAIL_NUMBER`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_CALL_VOICEMAIL_INTENT`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_IS_REFRESH`

Constant Value:

"android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION"


### ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED

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

```
public static final String ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED
```

Broadcast Action: The subscription carrier identity has changed.
This intent could be sent on the following events:

- Subscription absent. Carrier identity could change from a valid id to `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID`.
- Subscription loaded. Carrier identity could change from `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID` to a valid id.
- The subscription carrier is recognized after a remote update.

The intent will have the following extra values:

<!-- -->

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_CARRIER_ID` The up-to-date carrier id of the current subscription id.
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_CARRIER_NAME` The up-to-date carrier name of the current subscription.
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_SUBSCRIPTION_ID` The subscription id associated with the changed carrier identity.

This is a protected intent that can only be sent by the system.

<br />

Constant Value:

"android.telephony.action.SUBSCRIPTION_CARRIER_IDENTITY_CHANGED"


### ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED

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

```
public static final String ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED
```

Broadcast Action: The subscription specific carrier identity has changed.

A specific carrier ID returns the fine-grained carrier ID of the current subscription.
It can represent the fact that a carrier may be in effect an aggregation of other carriers
(ie in an MVNO type scenario) where each of these specific carriers which are used to make
up the actual carrier service may have different carrier configurations.
A specific carrier ID could also be used, for example, in a scenario where a carrier requires
different carrier configuration for different service offering such as a prepaid plan.

the specific carrier ID would be used for configuration purposes, but apps wishing to know
about the carrier itself should use the regular carrier ID returned by
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`.

Similar like `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED`, this intent will be
sent on the event of `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` while its also
possible to be sent without `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` when
specific carrier ID changes while carrier ID remains the same.
e.g, the same subscription switches to different IMSI could potentially change its
specific carrier ID while carrier id remains the same.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`

  `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`

Constant Value:

"android.telephony.action.SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED"


### ALLOWED_NETWORK_TYPES_REASON_CARRIER

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

```
public static final int ALLOWED_NETWORK_TYPES_REASON_CARRIER
```

To indicate allowed network type change is requested by carrier.
Carrier configuration won't affect the settings configured through
other reasons and will result in allowing network types that are in both
configurations (i.e intersection of both sets).

<br />

Constant Value:

2
(0x00000002)


### ALLOWED_NETWORK_TYPES_REASON_USER

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

```
public static final int ALLOWED_NETWORK_TYPES_REASON_USER
```

To indicate allowed network type change is requested by user.

<br />

Constant Value:

0
(0x00000000)


### APPTYPE_CSIM

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

```
public static final int APPTYPE_CSIM
```

UICC application type is CSIM

<br />

Constant Value:

4
(0x00000004)


### APPTYPE_ISIM

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

```
public static final int APPTYPE_ISIM
```

UICC application type is ISIM

<br />

Constant Value:

5
(0x00000005)


### APPTYPE_RUIM

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

```
public static final int APPTYPE_RUIM
```

UICC application type is RUIM

<br />

Constant Value:

3
(0x00000003)


### APPTYPE_SIM

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

```
public static final int APPTYPE_SIM
```

UICC application type is SIM

<br />

Constant Value:

1
(0x00000001)


### APPTYPE_UNKNOWN

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

```
public static final int APPTYPE_UNKNOWN
```

UICC application type is unknown or not specified

<br />

Constant Value:

0
(0x00000000)


### APPTYPE_USIM

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

```
public static final int APPTYPE_USIM
```

UICC application type is USIM

<br />

Constant Value:

2
(0x00000002)


### AUTHTYPE_EAP_AKA

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

```
public static final int AUTHTYPE_EAP_AKA
```

Authentication type for UICC challenge is EAP AKA. See RFC 4187 for details.

<br />

Constant Value:

129
(0x00000081)


### AUTHTYPE_EAP_SIM

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

```
public static final int AUTHTYPE_EAP_SIM
```

Authentication type for UICC challenge is EAP SIM. See RFC 4186 for details.

<br />

Constant Value:

128
(0x00000080)


### AUTHTYPE_GBA_BOOTSTRAP

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

```
public static final int AUTHTYPE_GBA_BOOTSTRAP
```

Authentication type for GBA Bootstrap Challenge.
Pass this authentication type into the `https://developer.android.com/reference/android/telephony/TelephonyManager#getIccAuthentication(int,%20int,%20java.lang.String)` API to perform a GBA
Bootstrap challenge (BSF), with `data` (generated according to the procedure defined in
3GPP 33.220 Section 5.3.2 step.4) in base64 encoding.
This method will return the Bootstrapping response in base64 encoding when ICC authentication
is completed.
Ref 3GPP 33.220 Section 5.3.2.

<br />

Constant Value:

132
(0x00000084)


### AUTHTYPE_GBA_NAF_KEY_EXTERNAL

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

```
public static final int AUTHTYPE_GBA_NAF_KEY_EXTERNAL
```

Authentication type for GBA Network Application Functions (NAF) key External Challenge.
Pass this authentication type into the `https://developer.android.com/reference/android/telephony/TelephonyManager#getIccAuthentication(int,%20int,%20java.lang.String)` API to perform a GBA
Network Applications Functions (NAF) key External challenge using the NAF_ID parameter
as the `data` in base64 encoding.
This method will return the Ks_Ext_Naf key in base64 encoding when ICC authentication
is completed.
Ref 3GPP 33.220 Section 5.3.2.

<br />

Constant Value:

133
(0x00000085)


### CALL_COMPOSER_STATUS_BUSINESS_ONLY

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

```
public static final int CALL_COMPOSER_STATUS_BUSINESS_ONLY
```

Call composer status **Business Only** from user setting.

<br />

Constant Value:

2
(0x00000002)


### CALL_COMPOSER_STATUS_OFF

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

```
public static final int CALL_COMPOSER_STATUS_OFF
```

Call composer status **OFF** from user setting.

<br />

Constant Value:

0
(0x00000000)


### CALL_COMPOSER_STATUS_ON

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

```
public static final int CALL_COMPOSER_STATUS_ON
```

Call composer status **ON** from user setting.

<br />

Constant Value:

1
(0x00000001)


### CALL_STATE_IDLE

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

```
public static final int CALL_STATE_IDLE
```

Device call state: No activity.

<br />

Constant Value:

0
(0x00000000)


### CALL_STATE_OFFHOOK

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

```
public static final int CALL_STATE_OFFHOOK
```

Device call state: Off-hook. At least one call exists
that is dialing, active, or on hold, and no calls are ringing
or waiting.

<br />

Constant Value:

2
(0x00000002)


### CALL_STATE_RINGING

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

```
public static final int CALL_STATE_RINGING
```

Device call state: Ringing. A new call arrived and is
ringing or waiting. In the latter case, another call is
already active.

<br />

Constant Value:

1
(0x00000001)


### CAPABILITY_SLICING_CONFIG_SUPPORTED

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

```
public static final String CAPABILITY_SLICING_CONFIG_SUPPORTED
```

Indicates whether `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)` is supported. See comments on
respective methods for more information.

<br />

Constant Value:

"CAPABILITY_SLICING_CONFIG_SUPPORTED"


### CARRIER_RESTRICTION_STATUS_NOT_RESTRICTED

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

```
public static final int CARRIER_RESTRICTION_STATUS_NOT_RESTRICTED
```

The device is not restricted to a carrier

<br />

Constant Value:

1
(0x00000001)


### CARRIER_RESTRICTION_STATUS_RESTRICTED

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

```
public static final int CARRIER_RESTRICTION_STATUS_RESTRICTED
```

The device is restricted to a carrier.

<br />

Constant Value:

2
(0x00000002)


### CARRIER_RESTRICTION_STATUS_RESTRICTED_TO_CALLER

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

```
public static final int CARRIER_RESTRICTION_STATUS_RESTRICTED_TO_CALLER
```

The device is restricted to the carrier of the calling application.

<br />

Constant Value:

3
(0x00000003)


### CARRIER_RESTRICTION_STATUS_UNKNOWN

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

```
public static final int CARRIER_RESTRICTION_STATUS_UNKNOWN
```

Carrier restriction status value is unknown, in case modem did not provide any
information about carrier restriction status.

<br />

Constant Value:

0
(0x00000000)


### CDMA_ROAMING_MODE_AFFILIATED

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

```
public static final int CDMA_ROAMING_MODE_AFFILIATED
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Value for `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_CDMA_ROAMING_MODE_INT` which permits roaming on
affiliated networks.

<br />

Constant Value:

1
(0x00000001)


### CDMA_ROAMING_MODE_ANY

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

```
public static final int CDMA_ROAMING_MODE_ANY
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Value for `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_CDMA_ROAMING_MODE_INT` which permits roaming on
any network.

<br />

Constant Value:

2
(0x00000002)


### CDMA_ROAMING_MODE_HOME

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

```
public static final int CDMA_ROAMING_MODE_HOME
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Value for `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_CDMA_ROAMING_MODE_INT` which only permits
connections on home networks.

<br />

Constant Value:

0
(0x00000000)


### CDMA_ROAMING_MODE_RADIO_DEFAULT

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

```
public static final int CDMA_ROAMING_MODE_RADIO_DEFAULT
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Value for `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_CDMA_ROAMING_MODE_INT` which leaves the roaming
mode set to the radio default or to the user's preference if they've indicated one.

<br />

Constant Value:

-1
(0xffffffff)


### DATA_ACTIVITY_DORMANT

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

```
public static final int DATA_ACTIVITY_DORMANT
```

Data connection is active, but physical link is down

<br />

Constant Value:

4
(0x00000004)


### DATA_ACTIVITY_IN

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

```
public static final int DATA_ACTIVITY_IN
```

Data connection activity: Currently receiving IP PPP traffic.

<br />

Constant Value:

1
(0x00000001)


### DATA_ACTIVITY_INOUT

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

```
public static final int DATA_ACTIVITY_INOUT
```

Data connection activity: Currently both sending and receiving
IP PPP traffic.

<br />

Constant Value:

3
(0x00000003)


### DATA_ACTIVITY_NONE

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

```
public static final int DATA_ACTIVITY_NONE
```

Data connection activity: No traffic.

<br />

Constant Value:

0
(0x00000000)


### DATA_ACTIVITY_OUT

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

```
public static final int DATA_ACTIVITY_OUT
```

Data connection activity: Currently sending IP PPP traffic.

<br />

Constant Value:

2
(0x00000002)


### DATA_CONNECTED

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

```
public static final int DATA_CONNECTED
```

Data connection state: Connected. IP traffic should be available.

<br />

Constant Value:

2
(0x00000002)


### DATA_CONNECTING

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

```
public static final int DATA_CONNECTING
```

Data connection state: Currently setting up a data connection.

<br />

Constant Value:

1
(0x00000001)


### DATA_DISCONNECTED

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

```
public static final int DATA_DISCONNECTED
```

Data connection state: Disconnected. IP traffic not available.

<br />

Constant Value:

0
(0x00000000)


### DATA_DISCONNECTING

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

```
public static final int DATA_DISCONNECTING
```

Data connection state: Disconnecting.

IP traffic may be available but will cease working imminently.

<br />

Constant Value:

4
(0x00000004)


### DATA_ENABLED_REASON_CARRIER

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

```
public static final int DATA_ENABLED_REASON_CARRIER
```

To indicate enable or disable carrier data by the system based on carrier signalling or
carrier privileged apps. Carrier data on/off won't affect user settings but will bypass the
settings and turns off data internally if set to `false`.

<br />

Constant Value:

2
(0x00000002)


### DATA_ENABLED_REASON_OVERRIDE

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

```
public static final int DATA_ENABLED_REASON_OVERRIDE
```

To indicate data was enabled or disabled due to mobile data policy overrides.
Note that this is not a valid reason for `https://developer.android.com/reference/android/telephony/TelephonyManager#setDataEnabledForReason(int,%20boolean)` and
is only used to indicate that data enabled was changed due to an override.

<br />

Constant Value:

4
(0x00000004)


### DATA_ENABLED_REASON_POLICY

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

```
public static final int DATA_ENABLED_REASON_POLICY
```

To indicate that data control due to policy. Usually used when data limit is passed.
Policy data on/off won't affect user settings but will bypass the
settings and turns off data internally if set to `false`.

<br />

Constant Value:

1
(0x00000001)


### DATA_ENABLED_REASON_THERMAL

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

```
public static final int DATA_ENABLED_REASON_THERMAL
```

To indicate enable or disable data by thermal service.
Thermal data on/off won't affect user settings but will bypass the
settings and turns off data internally if set to `false`.

<br />

Constant Value:

3
(0x00000003)


### DATA_ENABLED_REASON_UNKNOWN

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

```
public static final int DATA_ENABLED_REASON_UNKNOWN
```

To indicate that data was enabled or disabled due to an unknown reason.
Note that this is not a valid reason for `https://developer.android.com/reference/android/telephony/TelephonyManager#setDataEnabledForReason(int,%20boolean)` and
is only used to indicate that data enabled was changed.

<br />

Constant Value:

-1
(0xffffffff)


### DATA_ENABLED_REASON_USER

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

```
public static final int DATA_ENABLED_REASON_USER
```

To indicate that user enabled or disabled data.

<br />

Constant Value:

0
(0x00000000)


### DATA_HANDOVER_IN_PROGRESS

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

```
public static final int DATA_HANDOVER_IN_PROGRESS
```

Data connection state: Handover in progress. The connection is being transited from cellular
network to IWLAN, or from IWLAN to cellular network.

<br />

Constant Value:

5
(0x00000005)


### DATA_SUSPENDED

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

```
public static final int DATA_SUSPENDED
```

Data connection state: Suspended. The connection is up, but IP
traffic is temporarily unavailable. For example, in a 2G network,
data activity may be suspended when a voice call arrives.

<br />

Constant Value:

3
(0x00000003)


### DATA_UNKNOWN

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

```
public static final int DATA_UNKNOWN
```

Data connection state: Unknown. Used before we know the state.

<br />

Constant Value:

-1
(0xffffffff)


### DEFAULT_PORT_INDEX

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

```
public static final int DEFAULT_PORT_INDEX
```

Default port index for a UICC.

On physical SIM cards the only available port is 0.
See `https://developer.android.com/reference/android/telephony/UiccPortInfo` for more information on ports.

See `https://developer.android.com/reference/android/telephony/euicc/EuiccManager#isSimPortAvailable(int)` for information on
how portIndex is used on eUICCs.

<br />

Constant Value:

0
(0x00000000)


### ERI_FLASH

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

```
public static final int ERI_FLASH
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

ERI (Enhanced Roaming Indicator) is FLASH i.e value 2 defined by
3GPP2 C.R1001-H v1.0 Table 8.1-1.

<br />

Constant Value:

2
(0x00000002)


### ERI_OFF

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

```
public static final int ERI_OFF
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

ERI (Enhanced Roaming Indicator) is OFF i.e value 1 defined by
3GPP2 C.R1001-H v1.0 Table 8.1-1.

<br />

Constant Value:

1
(0x00000001)


### ERI_ON

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

```
public static final int ERI_ON
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

ERI (Enhanced Roaming Indicator) is ON i.e value 0 defined by
3GPP2 C.R1001-H v1.0 Table 8.1-1.

<br />

Constant Value:

0
(0x00000000)


### EVENT_DISPLAY_EMERGENCY_MESSAGE

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

```
public static final String EVENT_DISPLAY_EMERGENCY_MESSAGE
```

Event reported from the Telephony stack to indicate that the `https://developer.android.com/reference/android/telecom/Connection` is not
able to find any network and likely will not get connected. Upon receiving this event,
the dialer app should start the app included in the extras bundle of this event if satellite
is provisioned.


The dialer app receives this event via
`https://developer.android.com/reference/android/telecom/Call.Callback#onConnectionEvent(android.telecom.Call,%20java.lang.String,%20android.os.Bundle)`.


The `https://developer.android.com/reference/android/os/Bundle` parameter is guaranteed to include the following extras if the below
conditions are met:

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE` - the recommending handover type.
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT` - the `https://developer.android.com/reference/android/app/PendingIntent` which will be launched by the Dialer app when receiving this connection event.


If the device is connected to satellite via carrier within the hysteresis time defined by
the carrier config
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_SATELLITE_CONNECTION_HYSTERESIS_SEC_INT`, the component of
the `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT` will be set to the default SMS
app.


Otherwise, if the overlay config `config_oem_enabled_satellite_handover_app` is
present, the app defined by this config will be used as the component of the
`https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT`. If this overlay config is empty,
`https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT` will not be included in the event
`https://developer.android.com/reference/android/telephony/TelephonyManager#EVENT_DISPLAY_EMERGENCY_MESSAGE`.

<br />

Constant Value:

"android.telephony.event.DISPLAY_EMERGENCY_MESSAGE"


### EXTRA_ACTIVE_SIM_SUPPORTED_COUNT

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

```
public static final String EXTRA_ACTIVE_SIM_SUPPORTED_COUNT
```

The number of active SIM supported by current multi-SIM config. It's not related to how many
SIM/subscriptions are currently active.

Same value will be returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getActiveModemCount()`.

For single SIM mode, it's 1.
For DSDS or DSDA mode, it's 2.
For triple-SIM mode, it's 3.

Extra of `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_MULTI_SIM_CONFIG_CHANGED`.

type: integer

<br />

Constant Value:

"android.telephony.extra.ACTIVE_SIM_SUPPORTED_COUNT"


### EXTRA_APN_PROTOCOL

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

```
public static final String EXTRA_APN_PROTOCOL
```

An integer extra containing the protocol of the apn connection.

Sent with the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_PCO_VALUE` broadcast.
See the `PROTOCOL_*` constants in `https://developer.android.com/reference/android/telephony/data/ApnSetting` for a list of possible values.

<br />

Constant Value:

"android.telephony.extra.APN_PROTOCOL"


### EXTRA_APN_TYPE

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

```
public static final String EXTRA_APN_TYPE
```

An integer extra containing the APN type.

Sent with the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED`,
`https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_REDIRECTED`, and `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_PCO_VALUE`
broadcasts.
See the `TYPE_` constants in `https://developer.android.com/reference/android/telephony/data/ApnSetting` for a list of possible values.

<br />

Constant Value:

"android.telephony.extra.APN_TYPE"


### EXTRA_CALL_VOICEMAIL_INTENT

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

```
public static final String EXTRA_CALL_VOICEMAIL_INTENT
```

The intent to call voicemail.

<br />

Constant Value:

"android.telephony.extra.CALL_VOICEMAIL_INTENT"


### EXTRA_CARRIER_ID

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

```
public static final String EXTRA_CARRIER_ID
```

An int extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` which indicates
the updated carrier id returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`.

Will be `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID` if the subscription is unavailable or
the carrier cannot be identified.

<br />

Constant Value:

"android.telephony.extra.CARRIER_ID"


### EXTRA_CARRIER_NAME

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

```
public static final String EXTRA_CARRIER_NAME
```

An string extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` which
indicates the updated carrier name of the current subscription.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierIdName()`

  `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierIdName()`

Constant Value:

"android.telephony.extra.CARRIER_NAME"


### EXTRA_DATA_FAIL_CAUSE

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

```
public static final String EXTRA_DATA_FAIL_CAUSE
```

An integer extra containing the data fail cause.

Sent with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_REQUEST_NETWORK_FAILED`. See `https://developer.android.com/reference/android/telephony/DataFailCause`
for a list of possible values.

<br />

Constant Value:

"android.telephony.extra.DATA_FAIL_CAUSE"


### EXTRA_DEFAULT_NETWORK_AVAILABLE

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

```
public static final String EXTRA_DEFAULT_NETWORK_AVAILABLE
```

A boolean extra indicating the availability of the default network.
Sent with the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE` broadcast.

<br />

Constant Value:

"android.telephony.extra.DEFAULT_NETWORK_AVAILABLE"


### EXTRA_EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE

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

```
public static final String EXTRA_EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE
```

Integer extra key used with `https://developer.android.com/reference/android/telephony/TelephonyManager#EVENT_DISPLAY_EMERGENCY_MESSAGE` which indicates
the type of handover from emergency call to satellite messaging.


Will be either
android.telephony.satellite.SatelliteManager#EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_SOS
or
android.telephony.satellite.SatelliteManager#EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_T911


Set in the extras for the `https://developer.android.com/reference/android/telephony/TelephonyManager#EVENT_DISPLAY_EMERGENCY_MESSAGE` connection event.

<br />

Constant Value:

"android.telephony.extra.EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE"


### EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT

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

```
public static final String EXTRA_EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT
```

Extra key used with the `https://developer.android.com/reference/android/telephony/TelephonyManager#EVENT_DISPLAY_EMERGENCY_MESSAGE` for a `https://developer.android.com/reference/android/app/PendingIntent`
which will be launched by the Dialer app.

<br />

Constant Value:

"android.telephony.extra.EMERGENCY_CALL_TO_SATELLITE_LAUNCH_INTENT"


### EXTRA_HIDE_PUBLIC_SETTINGS

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

```
public static final String EXTRA_HIDE_PUBLIC_SETTINGS
```

The boolean value indicating whether the voicemail settings activity launched by `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CONFIGURE_VOICEMAIL` should hide settings accessible through public API. This is
used by dialer implementations which provides their own voicemail settings UI, but still
needs to expose device specific voicemail settings to the user.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CONFIGURE_VOICEMAIL`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#METADATA_HIDE_VOICEMAIL_SETTINGS_MENU`

Constant Value:

"android.telephony.extra.HIDE_PUBLIC_SETTINGS"


### EXTRA_INCOMING_NUMBER

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

```
public static final String EXTRA_INCOMING_NUMBER
```


**This constant was deprecated
in API level 29.**   

Companion apps for wearable devices should use the `https://developer.android.com/reference/android/telecom/InCallService` API
to retrieve the phone number for calls instead. Apps performing call screening should use
the `https://developer.android.com/reference/android/telecom/CallScreeningService` API instead.

Extra key used with the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED` broadcast
for a String containing the incoming or outgoing phone number.


This extra is only populated for receivers of the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED`
broadcast which have been granted the `https://developer.android.com/reference/android/Manifest.permission#READ_CALL_LOG` and
`https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` permissions.


For incoming calls, the phone number is only guaranteed to be populated when the
`https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` changes from `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_IDLE` to `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_RINGING`.
If the incoming caller is from an unknown number, the extra will be populated with an empty
string.
For outgoing calls, the phone number is only guaranteed to be populated when the
`https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` changes from `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_IDLE` to `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_OFFHOOK`.


Retrieve with
`https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String)`.

<br />

<br />

Constant Value:

"incoming_number"


### EXTRA_IS_REFRESH

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

```
public static final String EXTRA_IS_REFRESH
```

Boolean value representing whether the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SHOW_VOICEMAIL_NOTIFICATION` is new or a refresh of an existing
notification. Notification refresh happens after reboot or connectivity changes. The user has
already been notified for the voicemail so it should not alert the user, and should not be
shown again if the user has dismissed it.

<br />

Constant Value:

"android.telephony.extra.IS_REFRESH"


### EXTRA_LAST_KNOWN_NETWORK_COUNTRY

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

```
public static final String EXTRA_LAST_KNOWN_NETWORK_COUNTRY
```

The extra used with an `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_NETWORK_COUNTRY_CHANGED` to specify the
last known the country code in ISO-3166-1 alpha-2 format. This might be an empty string when
the country code was never available. The last known country code persists across reboot.


Retrieve with `https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String)`.

<br />

Constant Value:

"android.telephony.extra.LAST_KNOWN_NETWORK_COUNTRY"


### EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT

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

```
public static final String EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT
```

The intent to launch voicemail settings.

<br />

Constant Value:

"android.telephony.extra.LAUNCH_VOICEMAIL_SETTINGS_INTENT"


### EXTRA_NETWORK_COUNTRY

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

```
public static final String EXTRA_NETWORK_COUNTRY
```

The extra used with an `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_NETWORK_COUNTRY_CHANGED` to specify the
the country code in ISO-3166-1 alpha-2 format. This is the same country code returned by
`https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkCountryIso()`. This might be an empty string when the country code is not
available.


Retrieve with `https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String)`.

<br />

Constant Value:

"android.telephony.extra.NETWORK_COUNTRY"


### EXTRA_NOTIFICATION_COUNT

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

```
public static final String EXTRA_NOTIFICATION_COUNT
```

The number of voice messages associated with the notification.

<br />

Constant Value:

"android.telephony.extra.NOTIFICATION_COUNT"


### EXTRA_PCO_ID

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

```
public static final String EXTRA_PCO_ID
```

An integer extra indicating the ID for the PCO data.
Sent with the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_PCO_VALUE` broadcast.

<br />

Constant Value:

"android.telephony.extra.PCO_ID"


### EXTRA_PCO_VALUE

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

```
public static final String EXTRA_PCO_VALUE
```

A byte array extra containing PCO data read from the modem.
Sent with the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_PCO_VALUE` broadcast.

<br />

Constant Value:

"android.telephony.extra.PCO_VALUE"


### EXTRA_PHONE_ACCOUNT_HANDLE

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

```
public static final String EXTRA_PHONE_ACCOUNT_HANDLE
```

The extra used with an `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CONFIGURE_VOICEMAIL` and
`https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SHOW_VOICEMAIL_NOTIFICATION` `Intent` to specify the
`https://developer.android.com/reference/android/telecom/PhoneAccountHandle` the configuration or notification is for.


Retrieve with `https://developer.android.com/reference/android/content/Intent#getParcelableExtra(java.lang.String)`.

<br />

Constant Value:

"android.telephony.extra.PHONE_ACCOUNT_HANDLE"


### EXTRA_REDIRECTION_URL

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

```
public static final String EXTRA_REDIRECTION_URL
```

String extra containing the redirection URL sent with
`https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CARRIER_SIGNAL_REDIRECTED`.

<br />

Constant Value:

"android.telephony.extra.REDIRECTION_URL"


### EXTRA_SPECIFIC_CARRIER_ID

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

```
public static final String EXTRA_SPECIFIC_CARRIER_ID
```

An int extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED` which
indicates the updated specific carrier id returned by
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`. Note, its possible specific carrier id
changes while `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` remains the same
e.g, when subscription switch to different IMSIs.

Will be `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID` if the subscription is unavailable or
the carrier cannot be identified.

<br />

Constant Value:

"android.telephony.extra.SPECIFIC_CARRIER_ID"


### EXTRA_SPECIFIC_CARRIER_NAME

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

```
public static final String EXTRA_SPECIFIC_CARRIER_NAME
```

An string extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED`
which indicates the updated specific carrier name returned by
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierIdName()`.

it's a user-facing name of the specific carrier id `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_SPECIFIC_CARRIER_ID`
e.g, Tracfone-AT\&T

<br />

Constant Value:

"android.telephony.extra.SPECIFIC_CARRIER_NAME"


### EXTRA_STATE

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

```
public static final String EXTRA_STATE
```

The lookup key used with the `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED` broadcast
for a String containing the new call state.


Retrieve with
`https://developer.android.com/reference/android/content/Intent#getStringExtra(java.lang.String)`.

<br />

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_IDLE`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_RINGING`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE_OFFHOOK`

Constant Value:

"state"


### EXTRA_SUBSCRIPTION_ID

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

```
public static final String EXTRA_SUBSCRIPTION_ID
```

An int extra used with `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED` to indicate the
subscription which has changed; or in general whenever a subscription ID needs specified.

<br />

Constant Value:

"android.telephony.extra.SUBSCRIPTION_ID"


### EXTRA_VOICEMAIL_NUMBER

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

```
public static final String EXTRA_VOICEMAIL_NUMBER
```

The voicemail number.

<br />

Constant Value:

"android.telephony.extra.VOICEMAIL_NUMBER"


### INCLUDE_LOCATION_DATA_COARSE

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

```
public static final int INCLUDE_LOCATION_DATA_COARSE
```

Include coarse location data.

Indicates whether the caller would not like to receive
location related information which will be sent if the caller already possess
`https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION` and do not renounce the
permissions.

<br />

Constant Value:

1
(0x00000001)


### INCLUDE_LOCATION_DATA_FINE

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

```
public static final int INCLUDE_LOCATION_DATA_FINE
```

Include fine location data.

Indicates whether the caller would not like to receive
location related information which will be sent if the caller already possess
`https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION` and do not renounce the
permissions.

<br />

Constant Value:

2
(0x00000002)


### INCLUDE_LOCATION_DATA_NONE

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

```
public static final int INCLUDE_LOCATION_DATA_NONE
```

Specifies to not include any location related data.

Indicates whether the caller would not like to receive
location related information which will be sent if the caller already possess
`https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION` and do not renounce the
permissions.

<br />

Constant Value:

0
(0x00000000)


### METADATA_HIDE_VOICEMAIL_SETTINGS_MENU

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

```
public static final String METADATA_HIDE_VOICEMAIL_SETTINGS_MENU
```

A boolean meta-data value indicating whether the voicemail settings should be hidden in the
call settings page launched by
`https://developer.android.com/reference/android/telecom/TelecomManager#ACTION_SHOW_CALL_SETTINGS`.
Dialer implementations (see `https://developer.android.com/reference/android/telecom/TelecomManager#getDefaultDialerPackage()`)
which would also like to manage voicemail settings should set this meta-data to `true`
in the manifest registration of their application.

<br />

**See also:**

- `https://developer.android.com/reference/android/telecom/TelecomManager#ACTION_SHOW_CALL_SETTINGS`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_CONFIGURE_VOICEMAIL`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_HIDE_PUBLIC_SETTINGS`

Constant Value:

"android.telephony.HIDE_VOICEMAIL_SETTINGS_MENU"


### MULTISIM_ALLOWED

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

```
public static final int MULTISIM_ALLOWED
```

The usage of multiple SIM cards at the same time to register on the network (e.g. Dual
Standby or Dual Active) is supported.

<br />

Constant Value:

0
(0x00000000)


### MULTISIM_NOT_SUPPORTED_BY_CARRIER

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

```
public static final int MULTISIM_NOT_SUPPORTED_BY_CARRIER
```

The usage of multiple SIM cards at the same time to register on the network (e.g. Dual
Standby or Dual Active) is supported by the hardware, but restricted by the carrier.

<br />

Constant Value:

2
(0x00000002)


### MULTISIM_NOT_SUPPORTED_BY_HARDWARE

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

```
public static final int MULTISIM_NOT_SUPPORTED_BY_HARDWARE
```

The usage of multiple SIM cards at the same time to register on the network (e.g. Dual
Standby or Dual Active) is not supported by the hardware.

<br />

Constant Value:

1
(0x00000001)


### NETWORK_SELECTION_MODE_AUTO

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

```
public static final int NETWORK_SELECTION_MODE_AUTO
```

<br />

<br />

Constant Value:

1
(0x00000001)


### NETWORK_SELECTION_MODE_MANUAL

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

```
public static final int NETWORK_SELECTION_MODE_MANUAL
```

<br />

<br />

Constant Value:

2
(0x00000002)


### NETWORK_SELECTION_MODE_UNKNOWN

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

```
public static final int NETWORK_SELECTION_MODE_UNKNOWN
```

<br />

<br />

Constant Value:

0
(0x00000000)


### NETWORK_TYPE_1xRTT

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

```
public static final int NETWORK_TYPE_1xRTT
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Current network is 1xRTT

<br />

Constant Value:

7
(0x00000007)


### NETWORK_TYPE_BITMASK_1xRTT

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

```
public static final long NETWORK_TYPE_BITMASK_1xRTT
```

network type bitmask indicating the support of radio tech 1xRTT.

<br />

Constant Value:

64
(0x0000000000000040)


### NETWORK_TYPE_BITMASK_CDMA

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

```
public static final long NETWORK_TYPE_BITMASK_CDMA
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

network type bitmask indicating the support of radio tech CDMA(IS95A/IS95B).

<br />

Constant Value:

8
(0x0000000000000008)


### NETWORK_TYPE_BITMASK_EDGE

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

```
public static final long NETWORK_TYPE_BITMASK_EDGE
```

network type bitmask indicating the support of radio tech EDGE.

<br />

Constant Value:

2
(0x0000000000000002)


### NETWORK_TYPE_BITMASK_EHRPD

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

```
public static final long NETWORK_TYPE_BITMASK_EHRPD
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

network type bitmask indicating the support of radio tech EHRPD.

<br />

Constant Value:

8192
(0x0000000000002000)


### NETWORK_TYPE_BITMASK_EVDO_0

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

```
public static final long NETWORK_TYPE_BITMASK_EVDO_0
```

network type bitmask indicating the support of radio tech EVDO 0.

<br />

Constant Value:

16
(0x0000000000000010)


### NETWORK_TYPE_BITMASK_EVDO_A

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

```
public static final long NETWORK_TYPE_BITMASK_EVDO_A
```

network type bitmask indicating the support of radio tech EVDO A.

<br />

Constant Value:

32
(0x0000000000000020)


### NETWORK_TYPE_BITMASK_EVDO_B

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

```
public static final long NETWORK_TYPE_BITMASK_EVDO_B
```

network type bitmask indicating the support of radio tech EVDO B.

<br />

Constant Value:

2048
(0x0000000000000800)


### NETWORK_TYPE_BITMASK_GPRS

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

```
public static final long NETWORK_TYPE_BITMASK_GPRS
```

network type bitmask indicating the support of radio tech GPRS.

<br />

Constant Value:

1
(0x0000000000000001)


### NETWORK_TYPE_BITMASK_GSM

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

```
public static final long NETWORK_TYPE_BITMASK_GSM
```

network type bitmask indicating the support of radio tech GSM.

<br />

Constant Value:

32768
(0x0000000000008000)


### NETWORK_TYPE_BITMASK_HSDPA

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

```
public static final long NETWORK_TYPE_BITMASK_HSDPA
```

network type bitmask indicating the support of radio tech HSDPA.

<br />

Constant Value:

128
(0x0000000000000080)


### NETWORK_TYPE_BITMASK_HSPA

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

```
public static final long NETWORK_TYPE_BITMASK_HSPA
```

network type bitmask indicating the support of radio tech HSPA.

<br />

Constant Value:

512
(0x0000000000000200)


### NETWORK_TYPE_BITMASK_HSPAP

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

```
public static final long NETWORK_TYPE_BITMASK_HSPAP
```

network type bitmask indicating the support of radio tech HSPAP.

<br />

Constant Value:

16384
(0x0000000000004000)


### NETWORK_TYPE_BITMASK_HSUPA

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

```
public static final long NETWORK_TYPE_BITMASK_HSUPA
```

network type bitmask indicating the support of radio tech HSUPA.

<br />

Constant Value:

256
(0x0000000000000100)


### NETWORK_TYPE_BITMASK_IWLAN

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

```
public static final long NETWORK_TYPE_BITMASK_IWLAN
```

network type bitmask indicating the support of radio tech IWLAN.

<br />

Constant Value:

131072
(0x0000000000020000)


### NETWORK_TYPE_BITMASK_LTE

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

```
public static final long NETWORK_TYPE_BITMASK_LTE
```

network type bitmask indicating the support of radio tech LTE.

<br />

Constant Value:

4096
(0x0000000000001000)


### NETWORK_TYPE_BITMASK_LTE_CA

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

```
public static final long NETWORK_TYPE_BITMASK_LTE_CA
```


**This constant was deprecated
in API level 34.**   

Please use `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE` instead. Deprecated in Android U.

NOT USED; this bitmask is exposed accidentally.
If used, will be converted to `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE`.
network type bitmask indicating the support of radio tech LTE CA (carrier aggregation).

<br />

Constant Value:

262144
(0x0000000000040000)


### NETWORK_TYPE_BITMASK_NR

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

```
public static final long NETWORK_TYPE_BITMASK_NR
```

network type bitmask indicating the support of radio tech NR(New Radio) 5G.

<br />

Constant Value:

524288
(0x0000000000080000)


### NETWORK_TYPE_BITMASK_TD_SCDMA

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

```
public static final long NETWORK_TYPE_BITMASK_TD_SCDMA
```

network type bitmask indicating the support of radio tech TD_SCDMA.

<br />

Constant Value:

65536
(0x0000000000010000)


### NETWORK_TYPE_BITMASK_UMTS

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

```
public static final long NETWORK_TYPE_BITMASK_UMTS
```

network type bitmask indicating the support of radio tech UMTS.

<br />

Constant Value:

4
(0x0000000000000004)


### NETWORK_TYPE_BITMASK_UNKNOWN

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

```
public static final long NETWORK_TYPE_BITMASK_UNKNOWN
```

network type bitmask unknown.

<br />

Constant Value:

0
(0x0000000000000000)


### NETWORK_TYPE_CDMA

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

```
public static final int NETWORK_TYPE_CDMA
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Current network is CDMA: Either IS95A or IS95B

<br />

Constant Value:

4
(0x00000004)


### NETWORK_TYPE_EDGE

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

```
public static final int NETWORK_TYPE_EDGE
```

Current network is EDGE

<br />

Constant Value:

2
(0x00000002)


### NETWORK_TYPE_EHRPD

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

```
public static final int NETWORK_TYPE_EHRPD
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Current network is eHRPD

<br />

Constant Value:

14
(0x0000000e)


### NETWORK_TYPE_EVDO_0

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

```
public static final int NETWORK_TYPE_EVDO_0
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Current network is EVDO revision 0

<br />

Constant Value:

5
(0x00000005)


### NETWORK_TYPE_EVDO_A

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

```
public static final int NETWORK_TYPE_EVDO_A
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Current network is EVDO revision A

<br />

Constant Value:

6
(0x00000006)


### NETWORK_TYPE_EVDO_B

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

```
public static final int NETWORK_TYPE_EVDO_B
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Current network is EVDO revision B

<br />

Constant Value:

12
(0x0000000c)


### NETWORK_TYPE_GPRS

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

```
public static final int NETWORK_TYPE_GPRS
```

Current network is GPRS

<br />

Constant Value:

1
(0x00000001)


### NETWORK_TYPE_GSM

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

```
public static final int NETWORK_TYPE_GSM
```

Current network is GSM

<br />

Constant Value:

16
(0x00000010)


### NETWORK_TYPE_HSDPA

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

```
public static final int NETWORK_TYPE_HSDPA
```

Current network is HSDPA

<br />

Constant Value:

8
(0x00000008)


### NETWORK_TYPE_HSPA

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

```
public static final int NETWORK_TYPE_HSPA
```

Current network is HSPA

<br />

Constant Value:

10
(0x0000000a)


### NETWORK_TYPE_HSPAP

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

```
public static final int NETWORK_TYPE_HSPAP
```

Current network is HSPA+

<br />

Constant Value:

15
(0x0000000f)


### NETWORK_TYPE_HSUPA

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

```
public static final int NETWORK_TYPE_HSUPA
```

Current network is HSUPA

<br />

Constant Value:

9
(0x00000009)


### NETWORK_TYPE_IDEN

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

```
public static final int NETWORK_TYPE_IDEN
```


**This constant was deprecated
in API level 34.**   

Legacy network type no longer being used starting in Android U.

Current network is iDen

<br />

Constant Value:

11
(0x0000000b)


### NETWORK_TYPE_IWLAN

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

```
public static final int NETWORK_TYPE_IWLAN
```

Current network is IWLAN

<br />

Constant Value:

18
(0x00000012)


### NETWORK_TYPE_LTE

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

```
public static final int NETWORK_TYPE_LTE
```

Current network is LTE

<br />

Constant Value:

13
(0x0000000d)


### NETWORK_TYPE_NR

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

```
public static final int NETWORK_TYPE_NR
```

Current network is NR (New Radio) 5G.
This will only be returned for 5G SA.
For 5G NSA, the network type will be `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_LTE`.

<br />

Constant Value:

20
(0x00000014)


### NETWORK_TYPE_TD_SCDMA

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

```
public static final int NETWORK_TYPE_TD_SCDMA
```

Current network is TD_SCDMA

<br />

Constant Value:

17
(0x00000011)


### NETWORK_TYPE_UMTS

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

```
public static final int NETWORK_TYPE_UMTS
```

Current network is UMTS

<br />

Constant Value:

3
(0x00000003)


### NETWORK_TYPE_UNKNOWN

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

```
public static final int NETWORK_TYPE_UNKNOWN
```

Network type is unknown

<br />

Constant Value:

0
(0x00000000)


### PHONE_TYPE_CDMA

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

```
public static final int PHONE_TYPE_CDMA
```


**This constant was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Phone radio is CDMA.

<br />

Constant Value:

2
(0x00000002)


### PHONE_TYPE_GSM

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

```
public static final int PHONE_TYPE_GSM
```

Phone radio is GSM.

<br />

Constant Value:

1
(0x00000001)


### PHONE_TYPE_NONE

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

```
public static final int PHONE_TYPE_NONE
```

No phone radio.

<br />

Constant Value:

0
(0x00000000)


### PHONE_TYPE_SIP

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

```
public static final int PHONE_TYPE_SIP
```

Phone is via SIP.

<br />

Constant Value:

3
(0x00000003)


### PREMIUM_CAPABILITY_PRIORITIZE_LATENCY

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

```
public static final int PREMIUM_CAPABILITY_PRIORITIZE_LATENCY
```

A premium capability that boosts the network to allow for real-time interactive traffic
by prioritizing low latency communication.
Corresponds to `https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_PRIORITIZE_LATENCY`.

<br />

Constant Value:

34
(0x00000022)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_IN_PROGRESS

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_IN_PROGRESS
```

Purchase premium capability failed because a request was already made and is in progress.
This may have been requested by either the same app or another app.
Subsequent attempts will return the same error until the previous request completes.

<br />

Constant Value:

4
(0x00000004)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_PURCHASED

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_PURCHASED
```

Purchase premium capability failed because it is already purchased and available.
Subsequent attempts will return the same error until the performance boost expires.

<br />

Constant Value:

3
(0x00000003)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_DISABLED

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_DISABLED
```

Purchase premium capability failed because the carrier disabled or does not support
the capability, as specified in
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_SUPPORTED_PREMIUM_CAPABILITIES_INT_ARRAY`.
Subsequent attempts will return the same error until the carrier enables the feature.

<br />

Constant Value:

7
(0x00000007)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_ERROR

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_ERROR
```

Purchase premium capability failed because the carrier app did not indicate success.
Subsequent attempts will be throttled for the amount of time specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager`
and return `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED`.

<br />

Constant Value:

8
(0x00000008)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_ENTITLEMENT_CHECK_FAILED

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_ENTITLEMENT_CHECK_FAILED
```

Purchase premium capability failed because the entitlement check failed.
Subsequent attempts will be throttled for the amount of time specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager`
and return `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED`.
Throttling will be reevaluated when the network is no longer congested.

<br />

Constant Value:

13
(0x0000000d)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_FEATURE_NOT_SUPPORTED

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_FEATURE_NOT_SUPPORTED
```

Purchase premium capability failed because the device does not support the feature.
Subsequent attempts will return the same error.

<br />

Constant Value:

10
(0x0000000a)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_NETWORK_NOT_AVAILABLE

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_NETWORK_NOT_AVAILABLE
```

Purchase premium capability failed because the network is not available.
Subsequent attempts will return the same error until network conditions change.

<br />

Constant Value:

12
(0x0000000c)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_NOT_DEFAULT_DATA_SUBSCRIPTION

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_NOT_DEFAULT_DATA_SUBSCRIPTION
```

Purchase premium capability failed because the request was not made on the default data
subscription, indicated by `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultDataSubscriptionId()`.
Subsequent attempts will return the same error until the request is made on the default
data subscription.

<br />

Constant Value:

14
(0x0000000e)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_NOT_FOREGROUND

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_NOT_FOREGROUND
```

Purchase premium capability failed because the requesting application is not in the
foreground. Subsequent attempts will return the same error until the requesting application
moves to the foreground.

<br />

Constant Value:

5
(0x00000005)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_PENDING_NETWORK_SETUP

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_PENDING_NETWORK_SETUP
```

Purchase premium capability was successful and is waiting for the network to setup the
slicing configuration. If the setup is complete within the time specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_PREMIUM_CAPABILITY_NETWORK_SETUP_TIME_MILLIS_LONG`,
subsequent requests will return `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_PURCHASED`
until the purchase expires. If the setup is not complete within the time specified above,
applications can request the premium capability again.

<br />

Constant Value:

15
(0x0000000f)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_REQUEST_FAILED

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_REQUEST_FAILED
```

Purchase premium capability failed because the telephony service is unavailable
or there was an error in the phone process.
Subsequent attempts will return the same error until request conditions are satisfied.

<br />

Constant Value:

11
(0x0000000b)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_SUCCESS

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_SUCCESS
```

Purchase premium capability request was successful.
Once the purchase result is successful, the network must set up a slicing configuration
for the purchased premium capability within the timeout specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_PREMIUM_CAPABILITY_NETWORK_SETUP_TIME_MILLIS_LONG`.
During the setup time, subsequent attempts will return
`https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_PENDING_NETWORK_SETUP`.
After setup is complete, subsequent attempts will return
`https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_PURCHASED` until the boost expires.
The expiry time is determined by the type or duration of boost purchased from the carrier,
provided at `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_PREMIUM_CAPABILITY_PURCHASE_URL_STRING`.

<br />

Constant Value:

1
(0x00000001)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED
```

Purchase premium capability failed because the request is throttled.
If purchasing premium capabilities is throttled, it will be for the amount of time
specified by `https://developer.android.com/reference/android/telephony/CarrierConfigManager`.
If displaying the performance boost notification is throttled, it will be for the amount of
time specified by `https://developer.android.com/reference/android/telephony/CarrierConfigManager`.
We will show the performance boost notification to the user up to the daily and monthly
maximum number of times specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_PREMIUM_CAPABILITY_MAXIMUM_DAILY_NOTIFICATION_COUNT_INT` and
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_PREMIUM_CAPABILITY_MAXIMUM_MONTHLY_NOTIFICATION_COUNT_INT`.
Subsequent attempts will return the same error until the request is no longer throttled
or throttling conditions change.

<br />

Constant Value:

2
(0x00000002)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_TIMEOUT

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_TIMEOUT
```

Purchase premium capability failed because we did not receive a response from the user
for the performance boost notification within the time specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_PREMIUM_CAPABILITY_NOTIFICATION_DISPLAY_TIMEOUT_MILLIS_LONG`.
The performance boost notification will be automatically dismissed and subsequent attempts
will be throttled for the amount of time specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager`
and return `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED`.

<br />

Constant Value:

9
(0x00000009)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_CANCELED

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_CANCELED
```

Purchase premium capability failed because the user canceled the operation.
Subsequent attempts will be throttled for the amount of time specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager`
and return `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED`.

<br />

Constant Value:

6
(0x00000006)


### PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED

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

```
public static final int PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED
```

Purchase premium capability failed because the user disabled the feature.
Subsequent attempts will be throttled for the amount of time specified by
`https://developer.android.com/reference/android/telephony/CarrierConfigManager`
and return `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED`.

<br />

Constant Value:

16
(0x00000010)


### SET_OPPORTUNISTIC_SUB_INACTIVE_SUBSCRIPTION

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

```
public static final int SET_OPPORTUNISTIC_SUB_INACTIVE_SUBSCRIPTION
```

The subscription is not valid. It must be an active opportunistic subscription.

<br />

Constant Value:

2
(0x00000002)


### SET_OPPORTUNISTIC_SUB_NO_OPPORTUNISTIC_SUB_AVAILABLE

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

```
public static final int SET_OPPORTUNISTIC_SUB_NO_OPPORTUNISTIC_SUB_AVAILABLE
```

The subscription is not valid. It must be an opportunistic subscription.

<br />

Constant Value:

3
(0x00000003)


### SET_OPPORTUNISTIC_SUB_REMOTE_SERVICE_EXCEPTION

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

```
public static final int SET_OPPORTUNISTIC_SUB_REMOTE_SERVICE_EXCEPTION
```

Subscription service happened remote exception.

<br />

Constant Value:

4
(0x00000004)


### SET_OPPORTUNISTIC_SUB_SUCCESS

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

```
public static final int SET_OPPORTUNISTIC_SUB_SUCCESS
```

No error. Operation succeeded.

<br />

Constant Value:

0
(0x00000000)


### SET_OPPORTUNISTIC_SUB_VALIDATION_FAILED

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

```
public static final int SET_OPPORTUNISTIC_SUB_VALIDATION_FAILED
```

Validation failed when trying to switch to preferred subscription.

<br />

Constant Value:

1
(0x00000001)


### SIM_STATE_ABSENT

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

```
public static final int SIM_STATE_ABSENT
```

SIM card state: no SIM card is available in the device

<br />

Constant Value:

1
(0x00000001)


### SIM_STATE_CARD_IO_ERROR

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

```
public static final int SIM_STATE_CARD_IO_ERROR
```

SIM card state: SIM Card Error, present but faulty

<br />

Constant Value:

8
(0x00000008)


### SIM_STATE_CARD_RESTRICTED

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

```
public static final int SIM_STATE_CARD_RESTRICTED
```

SIM card state: SIM Card restricted, present but not usable due to
carrier restrictions.

<br />

Constant Value:

9
(0x00000009)


### SIM_STATE_NETWORK_LOCKED

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

```
public static final int SIM_STATE_NETWORK_LOCKED
```

SIM card state: Locked: requires a network PIN to unlock

<br />

Constant Value:

4
(0x00000004)


### SIM_STATE_NOT_READY

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

```
public static final int SIM_STATE_NOT_READY
```

SIM card state: SIM Card is NOT READY

<br />

Constant Value:

6
(0x00000006)


### SIM_STATE_PERM_DISABLED

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

```
public static final int SIM_STATE_PERM_DISABLED
```

SIM card state: SIM Card Error, permanently disabled

<br />

Constant Value:

7
(0x00000007)


### SIM_STATE_PIN_REQUIRED

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

```
public static final int SIM_STATE_PIN_REQUIRED
```

SIM card state: Locked: requires the user's SIM PIN to unlock

<br />

Constant Value:

2
(0x00000002)


### SIM_STATE_PUK_REQUIRED

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

```
public static final int SIM_STATE_PUK_REQUIRED
```

SIM card state: Locked: requires the user's SIM PUK to unlock

<br />

Constant Value:

3
(0x00000003)


### SIM_STATE_READY

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

```
public static final int SIM_STATE_READY
```

SIM card state: Ready

<br />

Constant Value:

5
(0x00000005)


### SIM_STATE_UNKNOWN

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

```
public static final int SIM_STATE_UNKNOWN
```

SIM card state: Unknown. Signifies that the SIM is in transition
between states. For example, when the user inputs the SIM pin
under PIN_REQUIRED state, a query for sim status returns
this state before turning to SIM_STATE_READY.

These are the ordinal value of IccCardConstants.State.

<br />

Constant Value:

0
(0x00000000)


### TTY_MODE_FULL

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

```
public static final int TTY_MODE_FULL
```

TTY (teletypewriter) mode is on. The speaker is off and the microphone is muted. The user
will communicate with the remote party by sending and receiving text messages.

<br />

Constant Value:

1
(0x00000001)


### TTY_MODE_HCO

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

```
public static final int TTY_MODE_HCO
```

TTY (teletypewriter) mode is in hearing carryover mode (HCO). The microphone is muted but the
speaker is on. The user will communicate with the remote party by sending text messages and
hearing an audible reply.

<br />

Constant Value:

2
(0x00000002)


### TTY_MODE_OFF

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

```
public static final int TTY_MODE_OFF
```

TTY (teletypewriter) mode is off.

<br />

Constant Value:

0
(0x00000000)


### TTY_MODE_VCO

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

```
public static final int TTY_MODE_VCO
```

TTY (teletypewriter) mode is in voice carryover mode (VCO). The speaker is off but the
microphone is still on. User will communicate with the remote party by speaking and receiving
text message replies.

<br />

Constant Value:

3
(0x00000003)


### UNINITIALIZED_CARD_ID

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

```
public static final int UNINITIALIZED_CARD_ID
```

A UICC card identifier used before the UICC card is loaded. See
`https://developer.android.com/reference/android/telephony/TelephonyManager#getCardIdForDefaultEuicc()` and `https://developer.android.com/reference/android/telephony/UiccCardInfo#getCardId()`.


Note that once the UICC card is loaded, the card ID may become `https://developer.android.com/reference/android/telephony/TelephonyManager#UNSUPPORTED_CARD_ID`.

<br />

Constant Value:

-2
(0xfffffffe)


### UNKNOWN_CARRIER_ID

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

```
public static final int UNKNOWN_CARRIER_ID
```

An unknown carrier id. It could either be subscription unavailable or the subscription
carrier cannot be recognized. Unrecognized carriers here means
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimOperator()` cannot be identified.

<br />

Constant Value:

-1
(0xffffffff)


### UNSUPPORTED_CARD_ID

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

```
public static final int UNSUPPORTED_CARD_ID
```

A UICC card identifier used if the device does not support the operation.
For example, `https://developer.android.com/reference/android/telephony/TelephonyManager#getCardIdForDefaultEuicc()` returns this value if the device has no
eUICC, or the eUICC cannot be read.

<br />

Constant Value:

-1
(0xffffffff)


### UPDATE_AVAILABLE_NETWORKS_ABORTED

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_ABORTED
```

The request is aborted.

<br />

Constant Value:

2
(0x00000002)


### UPDATE_AVAILABLE_NETWORKS_DISABLE_MODEM_FAIL

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_DISABLE_MODEM_FAIL
```

Disable modem fail.

<br />

Constant Value:

5
(0x00000005)


### UPDATE_AVAILABLE_NETWORKS_ENABLE_MODEM_FAIL

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_ENABLE_MODEM_FAIL
```

Enable modem fail.

<br />

Constant Value:

6
(0x00000006)


### UPDATE_AVAILABLE_NETWORKS_INVALID_ARGUMENTS

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_INVALID_ARGUMENTS
```

The parameter passed in is invalid.

<br />

Constant Value:

3
(0x00000003)


### UPDATE_AVAILABLE_NETWORKS_MULTIPLE_NETWORKS_NOT_SUPPORTED

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_MULTIPLE_NETWORKS_NOT_SUPPORTED
```

Carrier app does not support multiple available networks.

<br />

Constant Value:

7
(0x00000007)


### UPDATE_AVAILABLE_NETWORKS_NO_CARRIER_PRIVILEGE

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_NO_CARRIER_PRIVILEGE
```

No carrier privilege.

<br />

Constant Value:

4
(0x00000004)


### UPDATE_AVAILABLE_NETWORKS_NO_OPPORTUNISTIC_SUB_AVAILABLE

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_NO_OPPORTUNISTIC_SUB_AVAILABLE
```

The subscription is not valid. It must be an opportunistic subscription.

<br />

Constant Value:

8
(0x00000008)


### UPDATE_AVAILABLE_NETWORKS_REMOTE_SERVICE_EXCEPTION

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_REMOTE_SERVICE_EXCEPTION
```

There is no OpportunisticNetworkService.

<br />

Constant Value:

9
(0x00000009)


### UPDATE_AVAILABLE_NETWORKS_SERVICE_IS_DISABLED

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_SERVICE_IS_DISABLED
```

OpportunisticNetworkService is disabled.

<br />

Constant Value:

10
(0x0000000a)


### UPDATE_AVAILABLE_NETWORKS_SIM_PORT_NOT_AVAILABLE

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int UPDATE_AVAILABLE_NETWORKS_SIM_PORT_NOT_AVAILABLE
```

SIM port is not available to switch to opportunistic subscription.

<br />

Constant Value:

11
(0x0000000b)


### UPDATE_AVAILABLE_NETWORKS_SUCCESS

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_SUCCESS
```

No error. Operation succeeded.

<br />

Constant Value:

0
(0x00000000)


### UPDATE_AVAILABLE_NETWORKS_UNKNOWN_FAILURE

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

```
public static final int UPDATE_AVAILABLE_NETWORKS_UNKNOWN_FAILURE
```

There is a unknown failure happened.

<br />

Constant Value:

1
(0x00000001)


### USSD_ERROR_NOT_ALLOWED

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int USSD_ERROR_NOT_ALLOWED
```

Failure code returned when a USSD request has failed to execute because the calling app
is not allowed to send USSD requests.


Returned via `https://developer.android.com/reference/android/telephony/TelephonyManager.UssdResponseCallback#onReceiveUssdResponseFailed(android.telephony.TelephonyManager,%20java.lang.String,%20int)`.

<br />

Constant Value:

-3
(0xfffffffd)


### USSD_ERROR_SERVICE_UNAVAIL

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

```
public static final int USSD_ERROR_SERVICE_UNAVAIL
```

Failure code returned when a USSD request has failed to execute because the Telephony
service is unavailable.


Returned via `https://developer.android.com/reference/android/telephony/TelephonyManager.UssdResponseCallback#onReceiveUssdResponseFailed(android.telephony.TelephonyManager,%20java.lang.String,%20int)`.

<br />

Constant Value:

-2
(0xfffffffe)


### USSD_RETURN_FAILURE

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

```
public static final int USSD_RETURN_FAILURE
```

Failed code returned when the mobile network has failed to complete a USSD request.


Returned via `https://developer.android.com/reference/android/telephony/TelephonyManager.UssdResponseCallback#onReceiveUssdResponseFailed(android.telephony.TelephonyManager,%20java.lang.String,%20int)`.

<br />

Constant Value:

-1
(0xffffffff)


### VVM_TYPE_CVVM

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

```
public static final String VVM_TYPE_CVVM
```

A flavor of OMTP protocol with a different mobile originated (MO) format

<br />

Constant Value:

"vvm_type_cvvm"


### VVM_TYPE_OMTP

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

```
public static final String VVM_TYPE_OMTP
```

The OMTP protocol.

<br />

Constant Value:

"vvm_type_omtp"


## Fields

### EXTRA_STATE_IDLE

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

```
public static final String EXTRA_STATE_IDLE
```

Value used with `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` corresponding to
`https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_IDLE`.

<br />

### EXTRA_STATE_OFFHOOK

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

```
public static final String EXTRA_STATE_OFFHOOK
```

Value used with `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` corresponding to
`https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_OFFHOOK`.

<br />

### EXTRA_STATE_RINGING

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

```
public static final String EXTRA_STATE_RINGING
```

Value used with `https://developer.android.com/reference/android/telephony/TelephonyManager#EXTRA_STATE` corresponding to
`https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_RINGING`.

<br />

## Public methods

### canChangeDtmfToneLength

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

```
public boolean canChangeDtmfToneLength ()
```

Whether the device supports configuring the DTMF tone length.


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

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the DTMF tone length can be changed, and `false` otherwise. <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_CALLING`. |

### clearSignalStrengthUpdateRequest

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

```
public void clearSignalStrengthUpdateRequest (SignalStrengthUpdateRequest request)
```

Clear a `https://developer.android.com/reference/android/telephony/SignalStrengthUpdateRequest` from the system.

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

If the given request was not set before, this operation is a no-op.


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


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

<br />

| Parameters ||
|---|---|
| `request` | `SignalStrengthUpdateRequest`: the SignalStrengthUpdateRequest to be cleared from the System. 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_RADIO_ACCESS`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#setSignalStrengthUpdateRequest(android.telephony.SignalStrengthUpdateRequest)`

### createForPhoneAccountHandle

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

```
public TelephonyManager createForPhoneAccountHandle (PhoneAccountHandle phoneAccountHandle)
```

Create a new TelephonyManager object pinned to the subscription ID associated with the given
phone account.

<br />

| Parameters ||
|---|---|
| `phoneAccountHandle` | `PhoneAccountHandle` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/TelephonyManager` | a TelephonyManager that uses the given phone account for all calls, or `null` if the phone account does not correspond to a valid subscription ID. <br /> |

### createForSubscriptionId

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

```
public TelephonyManager createForSubscriptionId (int subId)
```

Create a new TelephonyManager object pinned to the given subscription ID.

<br />

| Parameters ||
|---|---|
| `subId` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/TelephonyManager` | a TelephonyManager that uses the given subId for all calls. <br /> |

### doesSwitchMultiSimConfigTriggerReboot

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

```
public boolean doesSwitchMultiSimConfigTriggerReboot ()
```

Get whether making changes to modem configurations by `https://developer.android.com/reference/android/telephony/TelephonyManager#switchMultiSimConfig(int)` will
trigger device reboot.
The modem configuration change refers to switching from single SIM configuration to DSDS
or the other way around.

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#READ_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_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `boolean` | `true` if reboot will be triggered after making changes to modem configurations, otherwise return `false`. <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_SUBSCRIPTION`. |

### getActiveModemCount

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

```
public int getActiveModemCount ()
```

Returns the number of logical modems currently configured to be activated.

- Returns 0 if none of voice, sms, data is supported.
- Returns 1 for Single standby mode (Single SIM functionality).
- Returns 2 for Dual standby mode (Dual SIM functionality).
- Returns 3 for Tri standby mode (Tri SIM functionality).

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getAllCellInfo

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

```
public List<CellInfo> getAllCellInfo ()
```

Requests all available cell information from all radios on the device including the
camped/registered, serving, and neighboring cells.

The response can include one or more `https://developer.android.com/reference/android/telephony/CellInfoGsm`,
`https://developer.android.com/reference/android/telephony/CellInfoCdma`,
`https://developer.android.com/reference/android/telephony/CellInfoTdscdma`,
`https://developer.android.com/reference/android/telephony/CellInfoLte`, and
`https://developer.android.com/reference/android/telephony/CellInfoWcdma` objects, in any combination.
It is typical to see instances of one or more of any these in the list. In addition, zero
or more of the returned objects may be considered registered; that is, their
`https://developer.android.com/reference/android/telephony/CellInfo#isRegistered()`
methods may return true, indicating that the cell is being used or would be used for
signaling communication if necessary.

Beginning with `https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q`,
if this API results in a change of the cached CellInfo, that change will be reported via
`https://developer.android.com/reference/android/telephony/TelephonyCallback.CellInfoListener#onCellInfoChanged(java.util.List<android.telephony.CellInfo>)`.

Apps targeting `https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q` or higher will no
longer trigger a refresh of the cached CellInfo by invoking this API. Instead, those apps
will receive the latest cached results, which may not be current. Apps targeting
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q` or higher that wish to request updated
CellInfo should call
`https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)`;
however, in all cases, updates will be rate-limited and are not guaranteed. To determine the
recency of CellInfo data, callers should check
`https://developer.android.com/reference/android/telephony/CellInfo#getTimeStamp()`.

This method returns valid data for devices with
`https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY`. In cases
where only partial information is available for a particular CellInfo entry, unavailable
fields will be reported as `https://developer.android.com/reference/android/telephony/CellInfo#UNAVAILABLE`. All reported
cells will include at least a valid set of technology-specific identification info and a
power level measurement.

This method is preferred over using `https://developer.android.com/reference/android/telephony/TelephonyManager#getCellLocation()`.


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


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/CellInfo>` | List of `https://developer.android.com/reference/android/telephony/CellInfo`; null if cell information is unavailable. <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_RADIO_ACCESS`. |

### getAllowedNetworkTypesForReason

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

```
public long getAllowedNetworkTypesForReason (int reason)
```

Get the allowed network types for certain reason.

`https://developer.android.com/reference/android/telephony/TelephonyManager#getAllowedNetworkTypesForReason(int)` returns allowed network type for a
specific reason.

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


Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE.


Requires the TelephonyManager#CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK feature which can be detected using `https://developer.android.com/reference/android/telephony/TelephonyManager#isRadioInterfaceCapabilitySupported(java.lang.String)`.

<br />

| Parameters ||
|---|---|
| `reason` | `int`: the reason the allowed network type change is taking place. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER` - `https://developer.android.com/reference/android/telephony/TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER` |

| Returns ||
|---|---|
| `long` | the allowed network type bitmask. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_GSM` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_GPRS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EDGE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_CDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_1xRTT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_0` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_A` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_B` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EHRPD` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSUPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSDPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSPAP` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_UMTS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_TD_SCDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE_CA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_NR` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_IWLAN` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if invalid AllowedNetworkTypesReason is passed. |
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the Telephony process is not currently available. |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not have the required permission/privileges |
| `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_RADIO_ACCESS`. |

### getCallComposerStatus

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

```
public int getCallComposerStatus ()
```

Get the user-set status for enriched calling with call composer.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`


Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE.


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

<br />

| Returns ||
|---|---|
| `int` | the user-set status for enriched calling with call composer, either of `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_ON` or `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_OFF`. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_ON` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_OFF` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_BUSINESS_ONLY` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not have the permission. |
| `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_CALLING`. |

### getCallState

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

```
public int getCallState ()
```


**This method was deprecated
in API level 31.**   

Use `https://developer.android.com/reference/android/telephony/TelephonyManager#getCallStateForSubscription()` to retrieve the call state for a
specific telephony subscription (which allows carrier privileged apps),
`https://developer.android.com/reference/android/telephony/TelephonyCallback.CallStateListener` for real-time call state updates, or
`https://developer.android.com/reference/android/telecom/TelecomManager#isInCall()`, which supplies an aggregate "in call" state for the entire
device.

Returns the state of all calls on the device.


This method considers not only calls in the Telephony stack, but also calls via other
`https://developer.android.com/reference/android/telecom/ConnectionService` implementations.


Note: The call state returned via this method may differ from what is reported by `https://developer.android.com/reference/android/telephony/TelephonyCallback.CallStateListener#onCallStateChanged(int)`, as that callback only considers
Telephony (mobile) calls.


Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` for applications
targeting API level 31+.

<br />

| Returns ||
|---|---|
| `int` | the current call state. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_IDLE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_RINGING` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_OFFHOOK` |

### getCallStateForSubscription

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

```
public int getCallStateForSubscription ()
```

Retrieve the call state for a specific subscription that was specified when this
TelephonyManager instance was created.

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


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


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

<br />

| Returns ||
|---|---|
| `int` | The call state of the subscription associated with this TelephonyManager instance. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_IDLE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_RINGING` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_STATE_OFFHOOK` |

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

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#createForPhoneAccountHandle(android.telecom.PhoneAccountHandle)`

### getCardIdForDefaultEuicc

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

```
public int getCardIdForDefaultEuicc ()
```

Get the card ID of the default eUICC card. If the eUICCs have not yet been loaded, returns
`https://developer.android.com/reference/android/telephony/TelephonyManager#UNINITIALIZED_CARD_ID`. If there is no eUICC or the device does not support card IDs
for eUICCs, returns `https://developer.android.com/reference/android/telephony/TelephonyManager#UNSUPPORTED_CARD_ID`.

The card ID is a unique identifier associated with a UICC or eUICC card. Card IDs are
unique to a device, and always refer to the same UICC or eUICC card unless the device goes
through a factory reset.


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

<br />

| Returns ||
|---|---|
| `int` | card ID of the default eUICC card, if loaded. <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_EUICC`. |

### getCarrierConfig

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

```
public PersistableBundle getCarrierConfig ()
```

Returns the carrier config of the subscription ID pinned to the TelephonyManager. If an
invalid subscription ID is pinned to the TelephonyManager, the returned config will contain
default values.

This method may take several seconds to complete, so it should only be called from a
worker thread.

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


This method may take several seconds to complete, so it should
only be called from a worker thread.


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


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/PersistableBundle` | <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_SUBSCRIPTION`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/CarrierConfigManager#getConfigForSubId(int)`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#createForPhoneAccountHandle(android.telecom.PhoneAccountHandle)`

### getCarrierIdFromSimMccMnc

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

```
public int getCarrierIdFromSimMccMnc ()
```

Returns carrier id based on sim MCCMNC (returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimOperator()`) only.
This is used for fallback when configurations/logic for exact carrier id
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()` are not found.

Android carrier id table [here](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/latest_carrier_id/carrier_list.textpb)
can be updated out-of-band, its possible a MVNO (Mobile Virtual Network Operator) carrier
was not fully recognized and assigned to its MNO (Mobile Network Operator) carrier id
by default. After carrier id table update, a new carrier id was assigned. If apps don't
take the update with the new id, it might be helpful to always fallback by using carrier
id based on MCCMNC if there is no match.


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

<br />

| Returns ||
|---|---|
| `int` | matching carrier id from sim MCCMNC. Return `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID` if the subscription is unavailable or the carrier cannot be identified. <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_SUBSCRIPTION`. |

### getCarrierRestrictionStatus

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

```
public void getCarrierRestrictionStatus (Executor executor, 
                Consumer<Integer> resultListener)
```

Get the carrier restriction status of the device.

To fetch the carrier restriction status of the device the calling application needs to be
allowlisted to Android at [here](https://android.googlesource.com/platform/packages/services/Telephony/+/master/assets/CarrierRestrictionOperatorDetails.json).
The calling application also needs the READ_PHONE_STATE permission.
The return value of the API is as follows.

- return `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_RESTRICTED_TO_CALLER` if the caller and the device locked by the network are same
- return `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_RESTRICTED` if the caller and the device locked by the network are different
- return `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_NOT_RESTRICTED` if the device is not locked
- return `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_UNKNOWN` if the device locking state is unavailable or radio does not supports the feature

.   
Requires the `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_SUBSCRIPTION` feature which can be detected using `https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)`.   
Requires `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE`

<br />

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The executor on which the result listener will be called. This value cannot be `null`. <br /> |
| `resultListener` | `Consumer`: `https://developer.android.com/reference/java/util/function/Consumer` that will be called with the carrier restriction status result fetched from the radio. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_NOT_RESTRICTED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_RESTRICTED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CARRIER_RESTRICTION_STATUS_RESTRICTED_TO_CALLER` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not have the required permission/privileges or if the caller is not pre-registered. |
| `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_SUBSCRIPTION`. |

### getCellLocation

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

```
public CellLocation getCellLocation ()
```


**This method was deprecated
in API level 26.**   

use `https://developer.android.com/reference/android/telephony/TelephonyManager#getAllCellInfo()` instead, which returns a superset of this API.

Returns the current location of the device.


If there is only one radio in the device and that radio has an LTE connection,
this method will return null. The implementation must not to try add LTE
identifiers into the existing cdma/gsm classes.

.


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


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/CellLocation` | Current location of the device or null if not available. <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_RADIO_ACCESS`. |

### getCurrentTtyMode

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

```
public int getCurrentTtyMode ()
```

Returns the current TTY mode of the device. For TTY to be on the user must enable it in
settings and have a wired headset plugged in.


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


Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#TTY_MODE_OFF` - `https://developer.android.com/reference/android/telephony/TelephonyManager#TTY_MODE_FULL` - `https://developer.android.com/reference/android/telephony/TelephonyManager#TTY_MODE_HCO` - `https://developer.android.com/reference/android/telephony/TelephonyManager#TTY_MODE_VCO` |

### getDataActivity

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

```
public int getDataActivity ()
```

Returns a constant indicating the type of activity on a data connection
(cellular).


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

<br />

| Returns ||
|---|---|
| `int` | <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_DATA`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_NONE`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_IN`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_OUT`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_INOUT`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ACTIVITY_DORMANT`

### getDataNetworkType

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

```
public int getDataNetworkType ()
```

Returns a constant indicating the radio technology (network type)
currently in use on the device for data transmission.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the given
subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getActiveDataSubscriptionId()`.

Note: Before `https://developer.android.com/reference/android/telephony/SubscriptionManager#getActiveDataSubscriptionId()` was introduced in API
level 30, it was applied to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultDataSubscriptionId()` which
may be different now from `https://developer.android.com/reference/android/telephony/SubscriptionManager#getActiveDataSubscriptionId()`, e.g.
when opportunistic network is providing cellular internet connection to the user.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE`
or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_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_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `int` | the network type. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GPRS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EDGE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UMTS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_CDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_0` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_A` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_1xRTT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSDPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSUPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IDEN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_B` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_LTE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EHRPD` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPAP` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GSM` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_TD_SCDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IWLAN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_NR` |

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

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UNKNOWN`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GPRS`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EDGE`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UMTS`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSDPA`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSUPA`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPA`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_CDMA`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_0`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_A`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_B`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_1xRTT`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IDEN`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_LTE`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EHRPD`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPAP`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_NR`

### getDataState

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

```
public int getDataState ()
```

Returns a constant indicating the current data connection state
(cellular).


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

<br />

| Returns ||
|---|---|
| `int` | <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_DATA`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_DISCONNECTED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_CONNECTING`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_CONNECTED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_SUSPENDED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_DISCONNECTING`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_HANDOVER_IN_PROGRESS`

### getDeviceId

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

```
public String getDeviceId ()
```


**This method was deprecated
in API level 26.**   

Use `https://developer.android.com/reference/android/telephony/TelephonyManager#getImei()` which returns IMEI for GSM or `https://developer.android.com/reference/android/telephony/TelephonyManager#getMeid()` which returns
MEID for CDMA.

Returns the unique device ID, for example, the IMEI for GSM and the MEID
or ESN for CDMA phones. Return null if device ID is not available.

Starting with API level 29, persistent device identifiers are guarded behind additional
restrictions, and apps are recommended to use resettable identifiers (see [Best practices for unique identifiers](https://developer.android.com/training/articles/user-data-ids)). This
method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`) on any active subscription.
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).

If the calling app does not meet one of these requirements then this method will behave
as follows:

- If the calling app's target SDK is API level 28 or lower and the app has the READ_PHONE_STATE permission then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app does not have the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

.   
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getDeviceId

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

```
public String getDeviceId (int slotIndex)
```


**This method was deprecated
in API level 26.**   

Use `https://developer.android.com/reference/android/telephony/TelephonyManager#getImei()` which returns IMEI for GSM or `https://developer.android.com/reference/android/telephony/TelephonyManager#getMeid()` which returns
MEID for CDMA.

Returns the unique device ID of a subscription, for example, the IMEI for
GSM and the MEID for CDMA phones. Return null if device ID is not available.

Starting with API level 29, persistent device identifiers are guarded behind additional
restrictions, and apps are recommended to use resettable identifiers (see [Best practices for unique identifiers](https://developer.android.com/training/articles/user-data-ids)). This
method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`) on any active subscription.
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).

If the calling app does not meet one of these requirements then this method will behave
as follows:

- If the calling app's target SDK is API level 28 or lower and the app has the READ_PHONE_STATE permission then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app does not have the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

.   
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE

<br />

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: of which deviceID is returned <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getDeviceSoftwareVersion

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

```
public String getDeviceSoftwareVersion ()
```

Returns the software version number for the device, for example,
the IMEI/SV for GSM phones. Return null if the software version is
not available.

.


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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`. |

### getEmergencyNumberList

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

```
public Map<Integer, List<EmergencyNumber>> getEmergencyNumberList ()
```

Get the emergency number list based on current locale, sim, default, modem and network.

In each returned list, the emergency number `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber` coming from higher
priority sources will be located at the smaller index; the priority order of sources are:
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_NETWORK_SIGNALING` \>
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_SIM` \>
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_DATABASE` \>
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_DEFAULT` \>
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_MODEM_CONFIG`

The subscriptions which the returned list would be based on, are all the active
subscriptions, no matter which subscription could be used to create TelephonyManager.

Requires permission `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or 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_PHONE_STATE`

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/Integer, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber>>` | Map including the keys as the active subscription IDs (Note: if there is no active subscription, the key is `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`) and the value as the list of `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber`; empty Map if this information is not available; or throw a SecurityException if the caller does not have the permission. 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_CALLING` or `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_MESSAGING`. |

### getEmergencyNumberList

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

```
public Map<Integer, List<EmergencyNumber>> getEmergencyNumberList (int categories)
```

Get the per-category emergency number list based on current locale, sim, default, modem
and network.

In each returned list, the emergency number `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber` coming from higher
priority sources will be located at the smaller index; the priority order of sources are:
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_NETWORK_SIGNALING` \>
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_SIM` \>
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_DATABASE` \>
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_DEFAULT` \>
`https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_MODEM_CONFIG`

The subscriptions which the returned list would be based on, are all the active
subscriptions, no matter which subscription could be used to create TelephonyManager.

Requires permission `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or 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_PHONE_STATE`

<br />

| Parameters ||
|---|---|
| `categories` | `int`: the emergency service categories which are the bitwise-OR combination of the following constants: 1. `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED` 2. `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_POLICE` 3. `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_AMBULANCE` 4. `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_FIRE_BRIGADE` 5. `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MARINE_GUARD` 6. `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MOUNTAIN_RESCUE` 7. `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MIEC` 8. `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_AIEC` . Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_POLICE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_AMBULANCE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_FIRE_BRIGADE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MARINE_GUARD` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MOUNTAIN_RESCUE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MIEC` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_AIEC` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/Integer, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber>>` | Map including the keys as the active subscription IDs (Note: if there is no active subscription, the key is `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`) and the value as the list of `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber`; empty Map if this information is not available; or throw a SecurityException if the caller does not have the permission. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the Telephony process is not currently available. |
| `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_CALLING` or `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_MESSAGING`. |

### getEquivalentHomePlmns

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

```
public List<String> getEquivalentHomePlmns ()
```

Returns a list of the equivalent home PLMNs (EF_EHPLMN) from the USIM app.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_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_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String>` | A list of equivalent home PLMNs. Returns an empty list if EF_EHPLMN is empty or does not exist on the SIM card. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the Telephony process is not currently available. |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller doesn't have the permission. |
| `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_SUBSCRIPTION`. |

### getForbiddenPlmns

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

```
public String[] getForbiddenPlmns ()
```

Returns an array of Forbidden PLMNs from the USIM App
Returns null if the query fails.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_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_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | an array of forbidden PLMNs or null if not available <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_SUBSCRIPTION`. |

### getGroupIdLevel1

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

```
public String getGroupIdLevel1 ()
```

Returns the Group Identifier Level1 for a GSM phone.
Return null if it is unavailable.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_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_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_SUBSCRIPTION`. |

### getIccAuthentication

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

```
public String getIccAuthentication (int appType, 
                int authType, 
                String data)
```

Returns the response of authentication for the default subscription.
Returns null if the authentication hasn't been successful

Requires one of the following permissions:

- the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).
- the calling app has been granted the `https://developer.android.com/reference/android/Manifest.permission#USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER` permission.
- the calling app has been granted the `https://developer.android.com/` permission.

The use of `https://developer.android.com/` is no longer supported. Use `https://developer.android.com/` instead.   
Requires the `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_SUBSCRIPTION` feature which can be detected using `https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)`.

<br />

<br />

| Parameters ||
|---|---|
| `appType` | `int`: the icc application type, like `https://developer.android.com/reference/android/telephony/TelephonyManager#APPTYPE_USIM` <br /> |
| `authType` | `int`: the authentication type, any one of `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_EAP_AKA` or `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_EAP_SIM` or `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_GBA_BOOTSTRAP` or `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_GBA_NAF_KEY_EXTERNAL` Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_EAP_SIM` - `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_EAP_AKA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_GBA_BOOTSTRAP` - `https://developer.android.com/reference/android/telephony/TelephonyManager#AUTHTYPE_GBA_NAF_KEY_EXTERNAL` |
| `data` | `String`: authentication challenge data, base64 encoded. See 3GPP TS 31.102 7.1.2 for more details. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the response of authentication. This value will be null in the following cases: Authentication error, incorrect MAC Authentication error, security context not supported Key freshness failure Authentication error, no memory space available Authentication error, no memory space available in EFMUK <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_SUBSCRIPTION` or doesn't support given authType. |

### getImei

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

```
public String getImei (int slotIndex)
```

Returns the IMEI (International Mobile Equipment Identity). Return null if IMEI is not
available.

Starting with API level 29, persistent device identifiers are guarded behind additional
restrictions, and apps are recommended to use resettable identifiers (see [Best practices for unique identifiers](https://developer.android.com/training/articles/user-data-ids)). This
method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`) on any active subscription.
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).
- If the calling app has been granted the `https://developer.android.com/reference/android/Manifest.permission#USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER` permission.

If the calling app does not meet one of these requirements then this method will behave
as follows:

- If the calling app's target SDK is API level 28 or lower and the app has the READ_PHONE_STATE permission then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app does not have the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

.   
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE

<br />

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: of which IMEI is returned <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getImei

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

```
public String getImei ()
```

Returns the IMEI (International Mobile Equipment Identity). Return null if IMEI is not
available.

See `https://developer.android.com/reference/android/telephony/TelephonyManager#getImei(int)` for details on the required permissions and behavior
when the caller does not hold sufficient permissions.


Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getLine1Number

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

```
public String getLine1Number ()
```


**This method was deprecated
in API level 33.**   

use `https://developer.android.com/reference/android/telephony/SubscriptionManager#getPhoneNumber(int)` instead.

Returns the phone number string for line 1, for example, the MSISDN
for a GSM phone for a particular subscription. Return null if it is unavailable.


The default SMS app can also use this.

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#READ_SMS`,
`https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_NUMBERS`,
that the caller is the default SMS app,
or that the caller has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`)
for any API level.
`https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE`
for apps targeting SDK API level 29 and below.


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_SMS` or `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_NUMBERS`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_SUBSCRIPTION`. |

### getManualNetworkSelectionPlmn

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

```
public String getManualNetworkSelectionPlmn ()
```

Get the PLMN chosen for Manual Network Selection if active.
Return empty string if in automatic selection.

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`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | manually selected network info on success or empty string on failure. 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_RADIO_ACCESS`. |

### getManufacturerCode

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

```
public String getManufacturerCode (int slotIndex)
```


**This method was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Returns the Manufacturer Code from the MEID. Return null if Manufacturer Code is not
available.


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

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: of which Type Allocation Code is returned <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_CDMA`. |

### getManufacturerCode

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

```
public String getManufacturerCode ()
```


**This method was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Returns the Manufacturer Code from the MEID. Return null if Manufacturer Code is not
available.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_CDMA`. |

### getMaximumCallComposerPictureSize

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

```
public static long getMaximumCallComposerPictureSize ()
```

Indicates the maximum size of the call composure picture.

Pictures sent via
`https://developer.android.com/reference/android/telephony/TelephonyManager#uploadCallComposerPicture(java.io.InputStream,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.os.ParcelUuid,android.telephony.TelephonyManager.CallComposerException>)`
or `https://developer.android.com/reference/android/telephony/TelephonyManager#uploadCallComposerPicture(java.nio.file.Path,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.os.ParcelUuid,android.telephony.TelephonyManager.CallComposerException>)` must not
exceed this size, or an error will be returned via the callback in those methods.


Value is a non-negative number of bytes.

<br />

| Returns ||
|---|---|
| `long` | Maximum file size in bytes. Value is a non-negative number of bytes. <br /> |

### getMeid

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

```
public String getMeid ()
```


**This method was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Returns the MEID (Mobile Equipment Identifier). Return null if MEID is not available.

Starting with API level 29, persistent device identifiers are guarded behind additional
restrictions, and apps are recommended to use resettable identifiers (see [Best practices for unique identifiers](https://developer.android.com/training/articles/user-data-ids)). This
method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`) on any active subscription.
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).

If the calling app does not meet one of these requirements then this method will behave
as follows:

- If the device is running Android 25Q2 or later, then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app has the READ_PHONE_STATE permission then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app does not have the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

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

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | If the device is running Android 25Q1 or earlier and does not have `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_CDMA`. |

### getMeid

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

```
public String getMeid (int slotIndex)
```


**This method was deprecated
in API level 36.**   

Legacy CDMA is unsupported.

Returns the MEID (Mobile Equipment Identifier). Return null if MEID is not available.

Starting with API level 29, persistent device identifiers are guarded behind additional
restrictions, and apps are recommended to use resettable identifiers (see [Best practices for unique identifiers](https://developer.android.com/training/articles/user-data-ids)). This
method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`) on any active subscription.
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).

If the calling app does not meet one of these requirements then this method will behave
as follows:

- If the calling app's target SDK is API level 28 or lower and the app has the READ_PHONE_STATE permission then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app does not have the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

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

<br />

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: of which MEID is returned <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_CDMA`. |

### getMmsUAProfUrl

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

```
public String getMmsUAProfUrl ()
```

Returns the MMS user agent profile URL.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_MESSAGING`. |

### getMmsUserAgent

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

```
public String getMmsUserAgent ()
```

Returns the MMS user agent.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_MESSAGING`. |

### getNai

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

```
public String getNai ()
```

Returns the Network Access Identifier (NAI). Return null if NAI is not available.

Starting with API level 29, persistent device identifiers are guarded behind additional
restrictions, and apps are recommended to use resettable identifiers (see [Best practices for unique identifiers](https://developer.android.com/training/articles/user-data-ids)). This
method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).

If the calling app does not meet one of these requirements then this method will behave
as follows:

- If the calling app's target SDK is API level 28 or lower and the app has the READ_PHONE_STATE permission then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app does not have the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

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

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_SUBSCRIPTION`. |

### getNetworkCountryIso

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

```
public String getNetworkCountryIso ()
```

Returns the ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) of
the current registered operator or the cell nearby, if available.

.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string if not available. <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_RADIO_ACCESS`. |

### getNetworkCountryIso

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

```
public String getNetworkCountryIso (int slotIndex)
```

Returns the ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) of
the current registered operator or the cell nearby, if available. This is same as
`https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkCountryIso()` but allowing specifying the SIM slot index. This is used for
accessing network country info from the SIM slot that does not have SIM inserted.


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

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: the SIM slot index to get network country ISO. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string if not available. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | when the slotIndex is invalid. |
| `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_RADIO_ACCESS`. |

### getNetworkOperator

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

```
public String getNetworkOperator ()
```

Returns the numeric name (MCC+MNC) of current registered operator.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getNetworkOperatorName

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

```
public String getNetworkOperatorName ()
```

Returns the alphabetic name of current registered operator.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getNetworkSelectionMode

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

```
public int getNetworkSelectionMode ()
```

Get the network selection mode.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`

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 android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or `https://developer.android.com/reference/android/Manifest.permission#READ_PRECISE_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `int` | the network selection mode. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_SELECTION_MODE_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_SELECTION_MODE_AUTO` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_SELECTION_MODE_MANUAL` |

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

### getNetworkSlicingConfiguration

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

```
public void getNetworkSlicingConfiguration (Executor executor, 
                OutcomeReceiver<NetworkSlicingConfig, TelephonyManager.NetworkSlicingException> callback)
```

Request to get the current slicing configuration including URSP rules and
NSSAIs (configured, allowed and rejected).

This method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).

This will be invalid if the device does not support android.telephony.TelephonyManager#CAPABILITY_SLICING_CONFIG_SUPPORTED.   
Requires the `https://developer.android.com/reference/android/telephony/TelephonyManager#CAPABILITY_SLICING_CONFIG_SUPPORTED` feature which can be detected using `https://developer.android.com/reference/android/telephony/TelephonyManager#isRadioInterfaceCapabilitySupported(java.lang.String)`.   
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE

<br />

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: the executor on which callback will be invoked. 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 /> |
| `callback` | `OutcomeReceiver`: a callback to receive the current slicing configuration. 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_RADIO_ACCESS`. |

### getNetworkSpecifier

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

```
public String getNetworkSpecifier ()
```

Returns the network specifier of the subscription ID pinned to the TelephonyManager. The
network specifier is used by `https://developer.android.com/reference/android/net/NetworkRequest.Builder#setNetworkSpecifier(java.lang.String)` to create a `https://developer.android.com/reference/android/net/NetworkRequest` that connects through the subscription.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/net/NetworkRequest.Builder#setNetworkSpecifier(java.lang.String)`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#createForPhoneAccountHandle(android.telecom.PhoneAccountHandle)`

### getNetworkType

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

```
public int getNetworkType ()
```


**This method was deprecated
in API level 30.**   

use `https://developer.android.com/reference/android/telephony/TelephonyManager#getDataNetworkType()`

Return the current data network type.


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


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

<br />

| Returns ||
|---|---|
| `int` | the NETWORK_TYPE_xxxx for current data connection. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GPRS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EDGE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UMTS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_CDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_0` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_A` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_1xRTT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSDPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSUPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IDEN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_B` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_LTE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EHRPD` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPAP` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GSM` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_TD_SCDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IWLAN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_NR` |

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

### getPhoneAccountHandle

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

```
public PhoneAccountHandle getPhoneAccountHandle ()
```

Determines the `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` associated with this TelephonyManager.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`

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


Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` | The `https://developer.android.com/reference/android/telecom/PhoneAccountHandle` associated with the TelphonyManager, or `null` if there is no associated `https://developer.android.com/reference/android/telecom/PhoneAccountHandle`; this can happen if the subscription is data-only or an opportunistic subscription. <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_CALLING`. |

### getPhoneCount

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

```
public int getPhoneCount ()
```


**This method was deprecated
in API level 30.**   

Use `https://developer.android.com/reference/android/telephony/TelephonyManager#getActiveModemCount()` instead.

Returns the number of phones available.

- Returns 0 if none of voice, sms, data is supported.
- Returns 1 for Single standby mode (Single SIM functionality).
- Returns 2 for Dual standby mode (Dual SIM functionality).
- Returns 3 for Tri standby mode (Tri SIM functionality).

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getPhoneType

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

```
public int getPhoneType ()
```

Returns a constant indicating the device phone type. This
indicates the type of radio used to transmit voice/data calls.


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

<br />

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

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#PHONE_TYPE_NONE`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#PHONE_TYPE_GSM`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#PHONE_TYPE_CDMA`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#PHONE_TYPE_SIP`

### getPreferredOpportunisticDataSubscription

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

```
public int getPreferredOpportunisticDataSubscription ()
```

Get preferred opportunistic data subscription Id

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


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


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

<br />

| Returns ||
|---|---|
| `int` | subId preferred opportunistic subscription id or `https://developer.android.com/reference/android/telephony/SubscriptionManager#DEFAULT_SUBSCRIPTION_ID` if there are no preferred subscription id <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_DATA`. |

### getPrimaryImei

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

```
public String getPrimaryImei ()
```

Returns the primary IMEI (International Mobile Equipment Identity) of the device as
mentioned in GSMA TS.37. `https://developer.android.com/reference/android/telephony/TelephonyManager#getImei(int)` returns the IMEI that belongs to the selected
slotID whereas this API `https://developer.android.com/reference/android/telephony/TelephonyManager#getPrimaryImei()` returns primary IMEI of the device.
A single SIM device with only one IMEI will be set by default as primary IMEI.
A multi-SIM device with multiple IMEIs will have one of the IMEIs set as primary as
mentioned in GSMA TS37_2.2_REQ_8.

Requires one of the following permissions

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`) on any active subscription.
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).
- If the calling app has been granted the `https://developer.android.com/reference/android/Manifest.permission#USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER` permission.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | Primary IMEI of type string. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not have the required permission/privileges |

### getServiceState

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

```
public ServiceState getServiceState (int includeLocationData)
```

Returns the current `https://developer.android.com/reference/android/telephony/ServiceState` information.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`

If you want continuous updates of service state info, register a `https://developer.android.com/reference/android/telephony/TelephonyCallback`
that implements `https://developer.android.com/reference/android/telephony/TelephonyCallback.ServiceStateListener` through `https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(int,%20java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)`.

There's another way to renounce permissions with a custom context
`AttributionSource.Builder#setRenouncedPermissions(Set<String>)` but only for system
apps. To avoid confusion, calling this method supersede renouncing permissions with a
custom context.

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


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` and `https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION`


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

<br />

| Parameters ||
|---|---|
| `includeLocationData` | `int`: Specifies if the caller would like to receive location related information. May return `null` when the subscription is inactive or when there was an error communicating with the phone process. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_NONE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_COARSE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_FINE` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/ServiceState` | This value may 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_RADIO_ACCESS`. |

### getServiceState

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

```
public ServiceState getServiceState ()
```

Returns the current `https://developer.android.com/reference/android/telephony/ServiceState` information.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`

If you want continuous updates of service state info, register a `https://developer.android.com/reference/android/telephony/TelephonyCallback`
that implements `https://developer.android.com/reference/android/telephony/TelephonyCallback.ServiceStateListener` through `https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(int,%20java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)`.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE`
or that the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`)
and `https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION`.
May return `null` when the subscription is inactive or when there was an error
communicating with the phone process.


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` and `https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/ServiceState` | <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_RADIO_ACCESS`. |

### getServiceStateForSlot

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

```
public ServiceState getServiceStateForSlot (int slotIndex)
```

Returns the service state information on specified SIM slot.

If you want continuous updates of service state info, register a `https://developer.android.com/reference/android/telephony/TelephonyCallback`
that implements `https://developer.android.com/reference/android/telephony/TelephonyCallback.ServiceStateListener` through
`https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(int,%20java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)`.

May return `null` when the `slotIndex` is invalid or when there was an error
communicating with the phone process

See `https://developer.android.com/reference/android/telephony/TelephonyManager#getActiveModemCount()` to get the total number of slots
that are active on the device.


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` and `https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION`


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

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: of phone whose service state is returned <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/ServiceState` | ServiceState on specified SIM slot. <br /> |

### getSignalStrength

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

```
public SignalStrength getSignalStrength ()
```

Get the most recently available signal strength information.

Get the most recent SignalStrength information reported by the modem. Due
to power saving this information may not always be current.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SignalStrength` | the most recent cached signal strength info from the modem. This value may 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_RADIO_ACCESS`. |

### getSimCarrierId

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

```
public int getSimCarrierId ()
```

Returns carrier id of the current subscription.

To recognize a carrier (including MVNO) as a first-class identity, Android assigns each
carrier with a canonical integer a.k.a. carrier id. The carrier ID is an Android
platform-wide identifier for a carrier. AOSP maintains carrier ID assignments in
[here](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/latest_carrier_id/carrier_list.textpb)

Apps which have carrier-specific configurations or business logic can use the carrier id
as an Android platform-wide identifier for carriers.


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

<br />

| Returns ||
|---|---|
| `int` | Carrier id of the current subscription. Return `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID` if the subscription is unavailable or the carrier cannot be identified. <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_SUBSCRIPTION`. |

### getSimCarrierIdName

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

```
public CharSequence getSimCarrierIdName ()
```

Returns carrier id name of the current subscription.

Carrier id name is a user-facing name of carrier id returned by
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`, usually the brand name of the subsidiary
(e.g. T-Mobile). Each carrier could configure multiple `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimOperatorName()` but
should have a single carrier name. Carrier name is not a canonical identity,
use `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()` instead.

The returned carrier name is unlocalized.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | Carrier name of the current subscription. Return `null` if the subscription is unavailable or the carrier cannot be identified. <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_SUBSCRIPTION`. |

### getSimCountryIso

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

```
public String getSimCountryIso ()
```

Returns the ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code.


The ISO-3166-1 alpha-2 country code is provided in lowercase 2 character format.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the lowercase 2 character ISO-3166-1 alpha-2 country code, or empty string is not available. <br /> |

### getSimOperator

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

```
public String getSimOperator ()
```

Returns the MCC+MNC (mobile country code + mobile network code) of the
provider of the SIM. 5 or 6 decimal digits.


Availability: SIM state must be `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_READY`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimState()`

### getSimOperatorName

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

```
public String getSimOperatorName ()
```

Returns the Service Provider Name (SPN).


Availability: SIM state must be `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_READY`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimState()`

### getSimSerialNumber

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

```
public String getSimSerialNumber ()
```

Returns the serial number of the SIM, if applicable. Return null if it is
unavailable.

Starting with API level 29, persistent device identifiers are guarded behind additional
restrictions, and apps are recommended to use resettable identifiers (see [Best practices for unique identifiers](https://developer.android.com/training/articles/user-data-ids)). This
method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).

If the calling app does not meet one of these requirements then this method will behave
as follows:

- If the calling app's target SDK is API level 28 or lower and the app has the READ_PHONE_STATE permission then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app does not have the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

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

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_SUBSCRIPTION`. |

### getSimSpecificCarrierId

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

```
public int getSimSpecificCarrierId ()
```

Returns fine-grained carrier ID of the current subscription.

A specific carrier ID can represent the fact that a carrier may be in effect an aggregation
of other carriers (ie in an MVNO type scenario) where each of these specific carriers which
are used to make up the actual carrier service may have different carrier configurations.
A specific carrier ID could also be used, for example, in a scenario where a carrier requires
different carrier configuration for different service offering such as a prepaid plan.

the specific carrier ID would be used for configuration purposes, but apps wishing to know
about the carrier itself should use the regular carrier ID returned by
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`.

e.g, Tracfone SIMs could return different specific carrier ID based on IMSI from current
subscription while carrier ID remains the same.

For carriers without fine-grained specific carrier ids, return `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId()`

Specific carrier ids are defined in the same way as carrier id
[here](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/latest_carrier_id/carrier_list.textpb)
except each with a "parent" id linking to its top-level carrier id.


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

<br />

| Returns ||
|---|---|
| `int` | Returns fine-grained carrier id of the current subscription. Return `https://developer.android.com/reference/android/telephony/TelephonyManager#UNKNOWN_CARRIER_ID` if the subscription is unavailable or the carrier cannot be identified. <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_SUBSCRIPTION`. |

### getSimSpecificCarrierIdName

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

```
public CharSequence getSimSpecificCarrierIdName ()
```

Similar like `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierIdName()`, returns user-facing name of the
specific carrier id returned by `https://developer.android.com/reference/android/telephony/TelephonyManager#getSimSpecificCarrierId()`.

The specific carrier ID would be used for configuration purposes, but apps wishing to know
about the carrier itself should use the regular carrier ID returned by
`https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierIdName()`.

The returned name is unlocalized.


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | user-facing name of the subscription specific carrier id. Return `null` if the subscription is unavailable or the carrier cannot be identified. <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_SUBSCRIPTION`. |

### getSimState

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

```
public int getSimState ()
```

Returns a constant indicating the state of the default SIM card.


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

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_ABSENT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PIN_REQUIRED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PUK_REQUIRED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NETWORK_LOCKED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_READY` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NOT_READY` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PERM_DISABLED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_IO_ERROR` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_RESTRICTED` |

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

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_UNKNOWN`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_ABSENT`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PIN_REQUIRED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PUK_REQUIRED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NETWORK_LOCKED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_READY`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NOT_READY`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PERM_DISABLED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_IO_ERROR`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_RESTRICTED`

### getSimState

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

```
public int getSimState (int slotIndex)
```

Returns a constant indicating the state of the device SIM card in a logical slot.


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

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: logical slot index <br /> |

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_ABSENT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PIN_REQUIRED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PUK_REQUIRED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NETWORK_LOCKED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_READY` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NOT_READY` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PERM_DISABLED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_IO_ERROR` - `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_RESTRICTED` |

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

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_UNKNOWN`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_ABSENT`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PIN_REQUIRED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PUK_REQUIRED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NETWORK_LOCKED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_READY`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_NOT_READY`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_PERM_DISABLED`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_IO_ERROR`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#SIM_STATE_CARD_RESTRICTED`

### getSubscriberId

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

```
public String getSubscriberId ()
```

Returns the unique subscriber ID, for example, the IMSI for a GSM phone.
Return null if it is unavailable.

Starting with API level 29, persistent device identifiers are guarded behind additional
restrictions, and apps are recommended to use resettable identifiers (see [Best practices for unique identifiers](https://developer.android.com/training/articles/user-data-ids)). This
method can be invoked if one of the following requirements is met:

- If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device.
- If the calling app is the device owner of a fully-managed device, a profile owner of an organization-owned device, or their delegates (see `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getEnrollmentSpecificId()`).
- If the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).
- If the calling app is the default SMS role holder (see `https://developer.android.com/reference/android/app/role/RoleManager#isRoleHeld(java.lang.String)`).
- If the calling app has been granted the `https://developer.android.com/reference/android/Manifest.permission#USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER` permission.

If the calling app does not meet one of these requirements then this method will behave
as follows:

- If the calling app's target SDK is API level 28 or lower and the app has the READ_PHONE_STATE permission then null is returned.
- If the calling app's target SDK is API level 28 or lower and the app does not have the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or higher, then a SecurityException is thrown.

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

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_SUBSCRIPTION`. |

### getSubscriptionId

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

```
public int getSubscriptionId (PhoneAccountHandle phoneAccountHandle)
```

Returns the subscription ID for the given phone account handle.


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


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

<br />

| Parameters ||
|---|---|
| `phoneAccountHandle` | `PhoneAccountHandle`: the phone account handle for outgoing calls. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int` | subscription ID for the given phone account handle; or `https://developer.android.com/reference/android/telephony/SubscriptionManager#INVALID_SUBSCRIPTION_ID` if not available; or throw a SecurityException if the caller doesn't have the permission. <br /> |

### getSubscriptionId

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

```
public int getSubscriptionId ()
```

Return an appropriate subscription ID for any situation.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, then the provided
subscription ID is returned. Otherwise, the default subscription ID will be returned.


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

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getSupportedModemCount

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

```
public int getSupportedModemCount ()
```

Return how many logical modem can be potentially active simultaneously, in terms of hardware
capability.
It might return different value from `https://developer.android.com/reference/android/telephony/TelephonyManager#getActiveModemCount()`. For example, for a
dual-SIM capable device operating in single SIM mode (only one logical modem is turned on),
`https://developer.android.com/reference/android/telephony/TelephonyManager#getActiveModemCount()` returns 1 while this API returns 2.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getSupportedRadioAccessFamily

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

```
public long getSupportedRadioAccessFamily ()
```

Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE.


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

<br />

| Returns ||
|---|---|
| `long` | Modem supported radio access family bitmask Requires permission: android.Manifest.READ_PRIVILEGED_PHONE_STATE or that the calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`). Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_GSM` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_GPRS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EDGE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_CDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_1xRTT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_0` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_A` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_B` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EHRPD` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSUPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSDPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSPAP` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_UMTS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_TD_SCDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE_CA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_NR` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_IWLAN` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not have the required permission |
| `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_RADIO_ACCESS`. |

### getTypeAllocationCode

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

```
public String getTypeAllocationCode ()
```

Returns the Type Allocation Code from the IMEI. Return null if Type Allocation Code is not
available.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getTypeAllocationCode

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

```
public String getTypeAllocationCode (int slotIndex)
```

Returns the Type Allocation Code from the IMEI. Return null if Type Allocation Code is not
available.

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: of which Type Allocation Code is returned <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getUiccCardsInfo

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

```
public List<UiccCardInfo> getUiccCardsInfo ()
```

Gets information about currently inserted UICCs (Universal Integrated Circuit Cards)
and eUICCs (embedded UICCs).


The details returned for each `https://developer.android.com/reference/android/telephony/UiccCardInfo` object
depend on the permissions held by the calling application.
The specific fields populated within each `UiccCardInfo` are determined as follows:

- With `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`: The `UiccCardInfo` will include whether the card is an eUICC (`https://developer.android.com/reference/android/telephony/UiccCardInfo#isEuicc()`) and its `https://developer.android.com/reference/android/telephony/UiccCardInfo#getPhysicalSlotIndex()`.
- With carrier privileges on any active subscription (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`): The `UiccCardInfo` will include the card ID (`https://developer.android.com/reference/android/telephony/UiccCardInfo#getCardId()`), whether it's an eUICC (`https://developer.android.com/reference/android/telephony/UiccCardInfo#isEuicc()`), and its `https://developer.android.com/reference/android/telephony/UiccCardInfo#getPhysicalSlotIndex()`.
- With carrier privileges on the specific UICC or eUICC card: Sensitive identifiers like the EID (`https://developer.android.com/reference/android/telephony/UiccCardInfo#getEid()`) and ICCID (`https://developer.android.com/reference/android/telephony/UiccCardInfo#getIccId()`) for that particular card can be accessed.

If an application lacks the necessary permissions for certain details of a card (e.g.,the EID due to missing specific carrier privileges for that card), those fields will not be populated in the `UiccCardInfo` object for that card.


See `https://developer.android.com/reference/android/telephony/UiccCardInfo` for a comprehensive description of all possible
card attributes and their individual data protection considerations.


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE` or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telephony/UiccCardInfo>` | A list of `UiccCardInfo` objects, representing the currently inserted UICCs and eUICCs. Each object contains information filtered according to the caller's permissions for that specific card. Returns an empty list if no cards are present or accessible. This value cannot be `null`. <br /> |

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

### getVisualVoicemailPackageName

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

```
public String getVisualVoicemailPackageName ()
```

Returns the package responsible of processing visual voicemail for the subscription ID pinned
to the TelephonyManager. Returns `null` when there is no package responsible for
processing visual voicemail for the subscription.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_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_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_CALLING`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`
- `https://developer.android.com/reference/android/telephony/TelephonyManager#createForPhoneAccountHandle(android.telecom.PhoneAccountHandle)`
- `https://developer.android.com/reference/android/telephony/VisualVoicemailService`

### getVoiceMailAlphaTag

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

```
public String getVoiceMailAlphaTag ()
```

Retrieves the alphabetic identifier associated with the voice
mail number.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_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_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_CALLING`. |

### getVoiceMailNumber

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

```
public String getVoiceMailNumber ()
```

Returns the voice mail number. Return null if it is unavailable.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_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_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <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_CALLING`. |

### getVoiceNetworkType

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

```
public int getVoiceNetworkType ()
```

Returns the NETWORK_TYPE_xxxx for voice

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE`
or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_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_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GPRS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EDGE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_UMTS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_CDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_0` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_A` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_1xRTT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSDPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSUPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IDEN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EVDO_B` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_LTE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_EHRPD` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_HSPAP` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_GSM` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_TD_SCDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_IWLAN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_NR` |

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

### getVoicemailRingtoneUri

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

```
public Uri getVoicemailRingtoneUri (PhoneAccountHandle accountHandle)
```

Returns the URI for the per-account voicemail ringtone set in Phone settings.


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

<br />

| Parameters ||
|---|---|
| `accountHandle` | `PhoneAccountHandle`: The handle for the `https://developer.android.com/reference/android/telecom/PhoneAccount` for which to retrieve the voicemail ringtone. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | The URI for the ringtone to play when receiving a voicemail from a specific PhoneAccount. May be `null` if no ringtone is set. <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_CALLING`. |

### hasCarrierPrivileges

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

```
public boolean hasCarrierPrivileges ()
```

Has the calling application been granted carrier privileges by the carrier.

If any of the packages in the calling UID has carrier privileges, the
call will return true. This access is granted by the owner of the UICC
card and does not depend on the registered carrier.

Note that this API applies to both physical and embedded subscriptions and
is a superset of the checks done in SubscriptionManager#canManageSubscription.


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

<br />

| Returns ||
|---|---|
| `boolean` | true if the app has carrier privileges. <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_SUBSCRIPTION`. |

### hasIccCard

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

```
public boolean hasIccCard ()
```

This API is used to check if there is an ICC card present in the device.

An ICC card is a smart card that contains a subscriber identity module (SIM) and is used
to identify and authenticate users to a mobile network.

Note: In case of embedded SIM there is an ICC card always present irrespective
of whether an active SIM profile is present or not so this API would always return true.


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

<br />

| Returns ||
|---|---|
| `boolean` | true if a ICC card is present. <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_SUBSCRIPTION`. |

### iccCloseLogicalChannel

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

```
public boolean iccCloseLogicalChannel (int channel)
```

Closes a previously opened logical channel to the ICC card.

Input parameters equivalent to TS 27.007 AT+CCHC command.
It is strongly recommended that callers of this API should firstly create
new TelephonyManager instance by calling
`https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`. Failure to do so can result in
unpredictable and detrimental behavior like callers can end up talking to the wrong SIM card.

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


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

<br />

| Parameters ||
|---|---|
| `channel` | `int`: is the channel id to be closed as returned by a successful iccOpenLogicalChannel. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the channel was closed successfully. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if input parameters are wrong. e.g., invalid channel |
| `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_SUBSCRIPTION`. |

### iccExchangeSimIO

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

```
public byte[] iccExchangeSimIO (int fileID, 
                int command, 
                int p1, 
                int p2, 
                int p3, 
                String filePath)
```

Returns the response APDU for a command APDU sent through SIM_IO.

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


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

<br />

| Parameters ||
|---|---|
| `p1` | `int`: P1 value of the APDU command. <br /> |
| `p2` | `int`: P2 value of the APDU command. <br /> |
| `p3` | `int`: P3 value of the APDU command. <br /> |

| Returns ||
|---|---|
| `byte[]` | The APDU response. <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_SUBSCRIPTION`. |

### iccOpenLogicalChannel

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

```
public IccOpenLogicalChannelResponse iccOpenLogicalChannel (String AID, 
                int p2)
```

Opens a logical channel to the ICC card.

This operation wraps two APDU instructions:

- MANAGE CHANNEL to open a logical channel
- SELECT the given `AID` using the given `p2`

Per Open Mobile API Specification v3.2 section 6.2.7.h, only p2 values of 0x00, 0x04, 0x08, and 0x0C are guaranteed to be supported. If the SELECT command's status word is not '9000', '62xx', or '63xx', the status word will be considered an error and the channel shall not be opened. Input parameters equivalent to TS 27.007 AT+CCHO command. It is strongly recommended that callers of this should firstly create a new TelephonyManager instance by calling `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`. Failure to do so can result in unpredictable and detrimental behavior like callers can end up talking to the wrong SIM card.

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


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

<br />

| Parameters ||
|---|---|
| `AID` | `String`: Application id. See ETSI 102.221 and 101.220. <br /> |
| `p2` | `int`: P2 parameter (described in ISO 7816-4). <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/IccOpenLogicalChannelResponse` | an IccOpenLogicalChannelResponse object. <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_SUBSCRIPTION`. |

### iccOpenLogicalChannel

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

```
public IccOpenLogicalChannelResponse iccOpenLogicalChannel (String AID)
```


**This method was deprecated
in API level 26.**   

Replaced by `https://developer.android.com/reference/android/telephony/TelephonyManager#iccOpenLogicalChannel(java.lang.String,%20int)`

Opens a logical channel to the ICC card.

Input parameters equivalent to TS 27.007 AT+CCHO command.

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


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

<br />

| Parameters ||
|---|---|
| `AID` | `String`: Application id. See ETSI 102.221 and 101.220. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/IccOpenLogicalChannelResponse` | an IccOpenLogicalChannelResponse object. <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_SUBSCRIPTION`. |

### iccTransmitApduBasicChannel

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

```
public String iccTransmitApduBasicChannel (int cla, 
                int instruction, 
                int p1, 
                int p2, 
                int p3, 
                String data)
```

Transmit an APDU to the ICC card over the basic channel.

Input parameters equivalent to TS 27.007 AT+CSIM command.

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


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

<br />

| Parameters ||
|---|---|
| `cla` | `int`: Class of the APDU command. <br /> |
| `instruction` | `int`: Instruction of the APDU command. <br /> |
| `p1` | `int`: P1 value of the APDU command. <br /> |
| `p2` | `int`: P2 value of the APDU command. <br /> |
| `p3` | `int`: P3 value of the APDU command. If p3 is negative a 4 byte APDU is sent to the SIM. <br /> |
| `data` | `String`: Data to be sent with the APDU. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The APDU response from the ICC card with the status appended at the end. <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_SUBSCRIPTION`. |

### iccTransmitApduLogicalChannel

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

```
public String iccTransmitApduLogicalChannel (int channel, 
                int cla, 
                int instruction, 
                int p1, 
                int p2, 
                int p3, 
                String data)
```

Transmit an APDU to the ICC card over a logical channel.

Input parameters equivalent to TS 27.007 AT+CGLA command.

It is strongly recommended that callers of this API should firstly create a new
TelephonyManager instance by calling
`https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`. Failure to do so can result in
unpredictable and detrimental behavior like callers can end up talking to the wrong SIM card.

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


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

<br />

| Parameters ||
|---|---|
| `channel` | `int`: is the channel id to be closed as returned by a successful iccOpenLogicalChannel. <br /> |
| `cla` | `int`: Class of the APDU command. <br /> |
| `instruction` | `int`: Instruction of the APDU command. <br /> |
| `p1` | `int`: P1 value of the APDU command. <br /> |
| `p2` | `int`: P2 value of the APDU command. <br /> |
| `p3` | `int`: P3 value of the APDU command. If p3 is negative a 4 byte APDU is sent to the SIM. <br /> |
| `data` | `String`: Data to be sent with the APDU. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The APDU response from the ICC card with the status appended at the end. <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_SUBSCRIPTION`. |

### isConcurrentVoiceAndDataSupported

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

```
public boolean isConcurrentVoiceAndDataSupported ()
```

Whether the device is currently on a technology (e.g. UMTS or LTE) which can support
voice and data simultaneously. This can change based on location or network condition.


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

<br />

| Returns ||
|---|---|
| `boolean` | `true` if simultaneous voice and data supported, and `false` otherwise. <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_DATA`. |

### isDataCapable

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

```
public boolean isDataCapable ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the current device is "data capable" over a radio on the device. "Data capable" means that this device supports packet-switched data connections over the telephony network. <br /> |

### isDataConnectionAllowed

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

```
public boolean isDataConnectionAllowed ()
```

Checks whether cellular data connection is allowed in the device.

Whether cellular data connection is allowed considers all factors below:

- User turned on data setting `https://developer.android.com/reference/android/telephony/TelephonyManager#isDataEnabled()`.
- Carrier allows data to be on.
- Network policy.
- And possibly others.

.   
Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_NETWORK_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`   
Requires the `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_DATA` feature which can be detected using `https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)`.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the overall data connection is allowed; `false` if not. <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_DATA`. |

### isDataEnabled

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

```
public boolean isDataEnabled ()
```

Returns whether mobile data is enabled or not per user setting. There are other factors
that could disable mobile data, but they are not considered here.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the given
subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultDataSubscriptionId()`

Requires one of the following permissions:
`https://developer.android.com/reference/android/Manifest.permission#ACCESS_NETWORK_STATE`,
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE`, or
`https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE` or that the calling app has carrier
privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).

Note that this does not take into account any data restrictions that may be present on the
calling app. Such restrictions may be inspected with
`https://developer.android.com/reference/android/net/ConnectivityManager#getRestrictBackgroundStatus()`.


Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_NETWORK_STATE` or `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `boolean` | true if mobile data is enabled. <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_DATA`. |

### isDataEnabledForReason

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

```
public boolean isDataEnabledForReason (int reason)
```

Return whether data is enabled for certain reason .

If `https://developer.android.com/reference/android/telephony/TelephonyManager#isDataEnabledForReason(int)` returns false, it means in data enablement for a
specific reason is turned off. If any of the reason is off, then it will result in
bypassing user preference and result in data to be turned off. Call
`https://developer.android.com/reference/android/telephony/TelephonyManager#isDataConnectionAllowed()` in order to know whether
data connection is allowed on the device.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies
to the given subId. Otherwise, applies to
`https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultDataSubscriptionId()`


Requires `https://developer.android.com/reference/android/Manifest.permission#ACCESS_NETWORK_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`


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

<br />

| Parameters ||
|---|---|
| `reason` | `int`: the reason the data enable change is taking place. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_USER` - `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_POLICY` - `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_CARRIER` - `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_THERMAL` |

| Returns ||
|---|---|
| `boolean` | whether data is enabled for a reason. Requires Permission: The calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`) or `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#ACCESS_NETWORK_STATE` or `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the Telephony process is not currently available. |
| `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_DATA`. |

### isDataRoamingEnabled

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

```
public boolean isDataRoamingEnabled ()
```

Returns whether mobile data roaming is enabled on the subscription.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultDataSubscriptionId()`

Requires one of the following permissions:
`https://developer.android.com/reference/android/Manifest.permission#ACCESS_NETWORK_STATE`,
`https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or
`https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_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#ACCESS_NETWORK_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the data roaming is enabled on the subscription, otherwise return <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_DATA`. `false`. |

### isDeviceSmsCapable

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

```
public boolean isDeviceSmsCapable ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the current device supports SMS service. If true, this means that the device supports both sending and receiving SMS via the telephony network. Note: Voicemail waiting SMS, cell broadcasting SMS, and MMS are disabled when device doesn't support SMS. Starting from Android 15, SMS capability may also be overridden by carriers for a given subscription on an SMS capable device. To check if a subscription is "SMS capable", call method `https://developer.android.com/reference/android/telephony/SubscriptionInfo#getServiceCapabilities()` and check if `https://developer.android.com/reference/android/telephony/SubscriptionManager#SERVICE_CAPABILITY_SMS` is included. |

**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionInfo#getServiceCapabilities()`

### isDeviceVoiceCapable

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

```
public boolean isDeviceVoiceCapable ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the current device is "voice capable". "Voice capable" means that this device supports circuit-switched or IMS packet switched (i.e. voice) phone calls over the telephony network, and is allowed to display the in-call UI while a cellular voice call is active. This will be false on "data only" devices which can't make voice calls and don't support any in-call UI. Note: the meaning of this flag is subtly different from the PackageManager .FEATURE_TELEPHONY system feature, which is available on any device with a telephony radio, even if the device is data-only. Starting from Android 15, voice capability may also be overridden by carrier for a given subscription on a voice capable device. To check if a subscription is "voice capable", call method `https://developer.android.com/reference/android/telephony/SubscriptionInfo#getServiceCapabilities()` and check if `https://developer.android.com/reference/android/telephony/SubscriptionManager#SERVICE_CAPABILITY_VOICE` is included. |

**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionInfo#getServiceCapabilities()`

### isEmergencyNumber

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

```
public boolean isEmergencyNumber (String number)
```

Identifies if the supplied phone number is an emergency number that matches a known
emergency number based on current locale, SIM card(s), Android database, modem, network,
or defaults.

This method assumes that only dialable phone numbers are passed in; non-dialable
numbers are not considered emergency numbers. A dialable phone number consists only
of characters/digits identified by `https://developer.android.com/reference/android/telephony/PhoneNumberUtils#isDialable(char)`.

The subscriptions which the identification would be based on, are all the active
subscriptions, no matter which subscription could be used to create TelephonyManager.

<br />

| Parameters ||
|---|---|
| `number` | `String`: - the number to look up. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the given number is an emergency number based on current locale, SIM card(s), Android database, modem, network or defaults; `false` otherwise. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the Telephony process is not currently available. |
| `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_CALLING` or `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_MESSAGING`. |

### isHearingAidCompatibilitySupported

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

```
public boolean isHearingAidCompatibilitySupported ()
```

Whether the phone supports hearing aid compatibility.


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

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the device supports hearing aid compatibility, and `false` otherwise. <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_CALLING`. |

### isManualNetworkSelectionAllowed

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

```
public boolean isManualNetworkSelectionAllowed ()
```

Checks if manual network selection is allowed.

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

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`.


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


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

<br />

| Returns ||
|---|---|
| `boolean` | `true` if manual network selection is allowed, otherwise return `false`. <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_RADIO_ACCESS`. |

### isModemEnabledForSlot

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

```
public boolean isModemEnabledForSlot (int slotIndex)
```

Indicates whether or not there is a modem stack enabled for the given SIM slot.

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`,
`https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE`,
READ_PRIVILEGED_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_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE` or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE.


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

<br />

| Parameters ||
|---|---|
| `slotIndex` | `int`: which slot it's checking. <br /> |

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

### isMultiSimSupported

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

```
public int isMultiSimSupported ()
```

Returns if the usage of multiple SIM cards at the same time to register on the network
(e.g. Dual Standby or Dual Active) is supported by the device and by the carrier.

Requires Permission:`https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE`,
`https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_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_PHONE_STATE` or `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE`


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

<br />

| Returns ||
|---|---|
| `int` | `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_ALLOWED` if the device supports multiple SIMs. `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_NOT_SUPPORTED_BY_HARDWARE` if the device does not support multiple SIMs. `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_NOT_SUPPORTED_BY_CARRIER` in the device supports multiple SIMs, but the functionality is restricted by the carrier. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_ALLOWED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_NOT_SUPPORTED_BY_HARDWARE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#MULTISIM_NOT_SUPPORTED_BY_CARRIER` |

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

### isNetworkRoaming

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

```
public boolean isNetworkRoaming ()
```

Returns true if the device is considered roaming on the current
network, for GSM purposes.


Availability: Only when user registered to a network.


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

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isPremiumCapabilityAvailableForPurchase

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

```
public boolean isPremiumCapabilityAvailableForPurchase (int capability)
```

Check whether the given premium capability is available for purchase from the carrier.
If this is `true`, the capability can be purchased from the carrier using
`https://developer.android.com/reference/android/telephony/TelephonyManager#purchasePremiumCapability(int,%20java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Integer>)`.


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


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

<br />

| Parameters ||
|---|---|
| `capability` | `int`: The premium capability to check. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#PREMIUM_CAPABILITY_PRIORITIZE_LATENCY` |

| Returns ||
|---|---|
| `boolean` | Whether the given premium capability is available to purchase. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not hold permission READ_BASIC_PHONE_STATE. |
| `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_DATA`. |

### isRadioInterfaceCapabilitySupported

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

```
public boolean isRadioInterfaceCapabilitySupported (String capability)
```

Whether the device supports a given capability on the radio interface.

If the capability is not in the set of radio interface capabilities, false is returned.


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

<br />

| Parameters ||
|---|---|
| `capability` | `String`: the name of the capability to check for. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#CAPABILITY_SLICING_CONFIG_SUPPORTED` |

| Returns ||
|---|---|
| `boolean` | the availability of the capability <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_RADIO_ACCESS`. |

### isRttSupported

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

```
public boolean isRttSupported ()
```

Determines whether the device currently supports RTT (Real-time text). Based both on carrier
support for the feature and device firmware support.


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

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the device and carrier both support RTT, `false` otherwise. <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`. |

### isSmsCapable

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

```
public boolean isSmsCapable ()
```


**This method was deprecated
in API level 35.**   

Replaced by `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceSmsCapable()`. Starting from Android 15, SMS
capability may also be overridden by carriers for a given subscription. For SMS capable
device (when `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceSmsCapable()` return `true`), caller should check for
subscription-level SMS capability as well. See `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceSmsCapable()` for details.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the current device supports sms service. If true, this means that the device supports both sending and receiving sms via the telephony network. Note: Voicemail waiting sms, cell broadcasting sms, and MMS are disabled when device doesn't support sms. |

### isTtyModeSupported

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

```
public boolean isTtyModeSupported ()
```


**This method was deprecated
in API level 28.**   

Use `https://developer.android.com/reference/android/telecom/TelecomManager#isTtySupported()` instead
Whether the phone supports TTY mode.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the device supports TTY mode, and `false` otherwise. <br /> |

### isVoiceCapable

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

```
public boolean isVoiceCapable ()
```


**This method was deprecated
in API level 35.**   

Replaced by `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceVoiceCapable()`. Starting from Android 15, voice
capability may also be overridden by carriers for a given subscription. For voice capable
device (when `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceVoiceCapable()` return `true`), caller should check for
subscription-level voice capability as well. See `https://developer.android.com/reference/android/telephony/TelephonyManager#isDeviceVoiceCapable()` for details.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the current device is "voice capable". "Voice capable" means that this device supports circuit-switched (i.e. voice) phone calls over the telephony network, and is allowed to display the in-call UI while a cellular voice call is active. This will be false on "data only" devices which can't make voice calls and don't support any in-call UI. Note: the meaning of this flag is subtly different from the PackageManager.FEATURE_TELEPHONY system feature, which is available on any device with a telephony radio, even if the device is data-only. |

### isVoicemailVibrationEnabled

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

```
public boolean isVoicemailVibrationEnabled (PhoneAccountHandle accountHandle)
```

Returns whether vibration is set for voicemail notification in Phone settings.


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

<br />

| Parameters ||
|---|---|
| `accountHandle` | `PhoneAccountHandle`: The handle for the `https://developer.android.com/reference/android/telecom/PhoneAccount` for which to retrieve the voicemail vibration setting. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the vibration is set for this PhoneAccount, `false` otherwise. <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_CALLING`. |

### isWorldPhone

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

```
public boolean isWorldPhone ()
```

Whether the device is a world phone.


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

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the device is a world phone, and `false` otherwise. <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`. |

### listen

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

```
public void listen (PhoneStateListener listener, 
                int events)
```


**This method was deprecated
in API level 31.**   

Use `https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)`.

Registers a listener object to receive notification of changes
in specified telephony states.


To register a listener, pass a `https://developer.android.com/reference/android/telephony/PhoneStateListener` and specify at least one telephony
state of interest in the events argument.

At registration, and when a specified telephony state changes, the telephony manager invokes
the appropriate callback method on the listener object and passes the current (updated)
values.


To un-register a listener, pass the listener object and set the events argument to
`https://developer.android.com/reference/android/telephony/PhoneStateListener#LISTEN_NONE` (0).

If this TelephonyManager object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`,
applies to the given subId. Otherwise, applies to
`https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`. To listen events for multiple subIds,
pass a separate listener object to each TelephonyManager object created with
`https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`.

Note: if you call this method while in the middle of a binder transaction, you **must**
call `https://developer.android.com/reference/android/os/Binder#clearCallingIdentity()` before calling this method. A
`https://developer.android.com/reference/java/lang/SecurityException` will be thrown otherwise.

This API should be used sparingly -- large numbers of listeners will cause system
instability. If a process has registered too many listeners without unregistering them, it
may encounter an `https://developer.android.com/reference/java/lang/IllegalStateException` when trying to register more listeners.

<br />

| Parameters ||
|---|---|
| `listener` | `PhoneStateListener`: The `https://developer.android.com/reference/android/telephony/PhoneStateListener` object to register (or unregister) <br /> |
| `events` | `int`: The telephony state(s) of interest to the listener, as a bitwise-OR combination of `https://developer.android.com/reference/android/telephony/PhoneStateListener` LISTEN_ flags. <br /> |

### purchasePremiumCapability

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

```
public void purchasePremiumCapability (int capability, 
                Executor executor, 
                Consumer<Integer> callback)
```

Purchase the given premium capability from the carrier.
This requires user action to purchase the boost from the carrier.
If this returns `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_SUCCESS` or
`https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_PURCHASED`, applications can request
the premium capability via `https://developer.android.com/reference/android/net/ConnectivityManager#requestNetwork(android.net.NetworkRequest,%20android.app.PendingIntent)`.


Requires `https://developer.android.com/reference/android/Manifest.permission#READ_BASIC_PHONE_STATE` and `https://developer.android.com/reference/android/Manifest.permission#INTERNET`


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

<br />

| Parameters ||
|---|---|
| `capability` | `int`: The premium capability to purchase. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#PREMIUM_CAPABILITY_PRIORITIZE_LATENCY` |
| `executor` | `Executor`: The callback executor for the response. 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 /> |
| `callback` | `Consumer`: The result of the purchase request. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_SUCCESS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_PURCHASED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_IN_PROGRESS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_NOT_FOREGROUND` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_CANCELED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_DISABLED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_ERROR` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_TIMEOUT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_FEATURE_NOT_SUPPORTED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_NETWORK_NOT_AVAILABLE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_ENTITLEMENT_CHECK_FAILED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_NOT_DEFAULT_DATA_SUBSCRIPTION` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_PENDING_NETWORK_SETUP` - `https://developer.android.com/reference/android/telephony/TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not hold permissions READ_BASIC_PHONE_STATE or INTERNET. |
| `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_DATA`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#isPremiumCapabilityAvailableForPurchase(int)`

### rebootModem

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

```
public void rebootModem ()
```

Reboot and re-initialize the cellular modem and related subsystems below the OS.

Used for device provisioning and reconfiguration by some carriers.

Device-specific and App-specific support information:

- This method is required to be supported on devices that launch with hardware support for `https://developer.android.com/reference/android/os/Build.VERSION_CODES#CINNAMON_BUN` and which declare `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_RADIO_ACCESS`.
- On other devices which either do not include hardware support for `https://developer.android.com/reference/android/os/Build.VERSION_CODES#CINNAMON_BUN` or do not declare `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_RADIO_ACCESS`, support is likely but not guaranteed.
- For applications targeting `https://developer.android.com/reference/android/os/Build.VERSION_CODES#BAKLAVA` or lower, if this method is not supported, it may fail silently.

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_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#MODIFY_PHONE_STATE`


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

<br />

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the Telephony process is not currently available. |
|   | java.lang.RuntimeException |
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | If the method is unsupported. |

### registerTelephonyCallback

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

```
public void registerTelephonyCallback (Executor executor, 
                TelephonyCallback callback)
```

Registers a callback object to receive notification of changes in specified telephony states.


To register a callback, pass a `https://developer.android.com/reference/android/telephony/TelephonyCallback` which implements
interfaces of events. For example,
FakeServiceStateCallback extends `https://developer.android.com/reference/android/telephony/TelephonyCallback` implements
`https://developer.android.com/reference/android/telephony/TelephonyCallback.ServiceStateListener`.

At registration, and when a specified telephony state changes, the telephony manager invokes
the appropriate callback method on the callback object and passes the current (updated)
values.


Note: Be aware of the permission requirements stated on the `https://developer.android.com/reference/android/telephony/TelephonyCallback`
listeners you implement. Your application must be granted these permissions in order to
register a `https://developer.android.com/reference/android/telephony/TelephonyCallback` which requires them; a `https://developer.android.com/reference/java/lang/SecurityException` will be
thrown if you do not hold the required permissions for all `https://developer.android.com/reference/android/telephony/TelephonyCallback`
listeners you implement.


If this TelephonyManager object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`,
applies to the given subId. Otherwise, applies to
`https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`. To register events for multiple
subIds, pass a separate callback object to each TelephonyManager object created with
`https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`.

Note: if you call this method while in the middle of a binder transaction, you **must**
call `https://developer.android.com/reference/android/os/Binder#clearCallingIdentity()` before calling this method. A
`https://developer.android.com/reference/java/lang/SecurityException` will be thrown otherwise.

This API should be used sparingly -- large numbers of callbacks will cause system
instability. If a process has registered too many callbacks without unregistering them, it
may encounter an `https://developer.android.com/reference/java/lang/IllegalStateException` when trying to register more callbacks.

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The executor of where the callback will execute. 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 /> |
| `callback` | `TelephonyCallback`: The `https://developer.android.com/reference/android/telephony/TelephonyCallback` object to register. The caller should hold a reference to the callback. The framework only holds a weak reference. This value cannot be `null`. <br /> |

### registerTelephonyCallback

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

```
public void registerTelephonyCallback (int includeLocationData, 
                Executor executor, 
                TelephonyCallback callback)
```

Registers a callback object to receive notification of changes in specified telephony states.


To register a callback, pass a `https://developer.android.com/reference/android/telephony/TelephonyCallback` which implements
interfaces of events. For example,
FakeServiceStateCallback extends `https://developer.android.com/reference/android/telephony/TelephonyCallback` implements
`https://developer.android.com/reference/android/telephony/TelephonyCallback.ServiceStateListener`.

At registration, and when a specified telephony state changes, the telephony manager invokes
the appropriate callback method on the callback object and passes the current (updated)
values.


If this TelephonyManager object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`,
applies to the given subId. Otherwise, applies to
`https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`. To register events for multiple
subIds, pass a separate callback object to each TelephonyManager object created with
`https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`.

Note: if you call this method while in the middle of a binder transaction, you **must**
call `https://developer.android.com/reference/android/os/Binder#clearCallingIdentity()` before calling this method. A
`https://developer.android.com/reference/java/lang/SecurityException` will be thrown otherwise.

This API should be used sparingly -- large numbers of callbacks will cause system
instability. If a process has registered too many callbacks without unregistering them, it
may encounter an `https://developer.android.com/reference/java/lang/IllegalStateException` when trying to register more callbacks.


There's another way to renounce permissions with a custom context
`AttributionSource.Builder#setRenouncedPermissions(Set<String>)` but only for system
apps. To avoid confusion, calling this method supersede renouncing permissions with a
custom context.

<br />

| Parameters ||
|---|---|
| `includeLocationData` | `int`: Specifies if the caller would like to receive location related information. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_NONE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_COARSE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_FINE` |
| `executor` | `Executor`: The executor of where the callback will execute. 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 /> |
| `callback` | `TelephonyCallback`: The `https://developer.android.com/reference/android/telephony/TelephonyCallback` object to register. The caller should hold a reference to the callback. The framework only holds a weak reference. This value cannot be `null`. <br /> |

### requestCellInfoUpdate

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

```
public void requestCellInfoUpdate (Executor executor, 
                TelephonyManager.CellInfoCallback callback)
```

Requests all available cell information from the current subscription for observed
camped/registered, serving, and neighboring cells.

Any available results from this request will be provided by calls to
`https://developer.android.com/reference/android/telephony/TelephonyCallback.CellInfoListener#onCellInfoChanged(java.util.List<android.telephony.CellInfo>)`
for each active subscription.

This method returns valid data for devices with
`https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY`. On devices
that do not implement this feature, the behavior is not reliable.


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


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

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: the executor on which callback will be invoked. 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 /> |
| `callback` | `TelephonyManager.CellInfoCallback`: a callback to receive CellInfo. 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_RADIO_ACCESS`. |

### requestNetworkScan

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

```
public NetworkScan requestNetworkScan (NetworkScanRequest request, 
                Executor executor, 
                TelephonyScanManager.NetworkScanCallback callback)
```

Request a network scan.

This method is asynchronous, so the network scan results will be returned by callback.
The returned NetworkScan will contain a callback method which can be used to stop the scan.

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

If the system-wide location switch is off, apps may still call this API, with the
following constraints:

1. The app must hold the `android.permission.NETWORK_SCAN` permission.
2. The app must not supply any specific bands or channels to scan.
3. The app must only specify MCC/MNC pairs that are associated to a SIM in the device.
4. Returned results will have no meaningful info other than signal strength and MCC/MNC info.

.   
Requires `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` and `https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION`   
Requires the `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_TELEPHONY_RADIO_ACCESS` feature which can be detected using `https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)`.

<br />

<br />

| Parameters ||
|---|---|
| `request` | `NetworkScanRequest`: Contains all the RAT with bands/channels that need to be scanned. <br /> |
| `executor` | `Executor`: The executor through which the callback should be invoked. Since the scan request may trigger multiple callbacks and they must be invoked in the same order as they are received by the platform, the user should provide an executor which executes tasks one at a time in serial order. <br /> |
| `callback` | `TelephonyScanManager.NetworkScanCallback`: Returns network scan results or errors. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/NetworkScan` | A NetworkScan obj which contains a callback which can be used to stop the scan. <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_RADIO_ACCESS`. |

### requestNetworkScan

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

```
public NetworkScan requestNetworkScan (int includeLocationData, 
                NetworkScanRequest request, 
                Executor executor, 
                TelephonyScanManager.NetworkScanCallback callback)
```

Request a network scan.

This method is asynchronous, so the network scan results will be returned by callback.
The returned NetworkScan will contain a callback method which can be used to stop the scan.

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` or that the calling
app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`)
and `https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION` if includeLocationData is
set to `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_FINE`.

If the system-wide location switch is off, apps may still call this API, with the
following constraints:

1. The app must hold the `android.permission.NETWORK_SCAN` permission.
2. The app must not supply any specific bands or channels to scan.
3. The app must only specify MCC/MNC pairs that are associated to a SIM in the device.
4. Returned results will have no meaningful info other than signal strength and MCC/MNC info.

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

<br />

<br />

| Parameters ||
|---|---|
| `includeLocationData` | `int`: Specifies if the caller would like to receive location related information. If this parameter is set to `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_FINE` then the application will be checked for `https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION` permission and available location related information received during network scan will be sent to the caller. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_NONE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_COARSE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#INCLUDE_LOCATION_DATA_FINE` |
| `request` | `NetworkScanRequest`: Contains all the RAT with bands/channels that need to be scanned. This value cannot be `null`. <br /> |
| `executor` | `Executor`: The executor through which the callback should be invoked. Since the scan request may trigger multiple callbacks and they must be invoked in the same order as they are received by the platform, the user should provide an executor which executes tasks one at a time in serial order. This value cannot be `null`. <br /> |
| `callback` | `TelephonyScanManager.NetworkScanCallback`: Returns network scan results or errors. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/NetworkScan` | A NetworkScan obj which contains a callback which can be used to stop the scan. This value may 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_RADIO_ACCESS`. |

### sendDialerSpecialCode

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

```
public void sendDialerSpecialCode (String inputCode)
```

Send the special dialer code. The IPC caller must be the current default dialer or have
carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`).


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

<br />

| Parameters ||
|---|---|
| `inputCode` | `String`: The special dialer code to send <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not have carrier privileges or is not the current default dialer |
| `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_CALLING`. |

### sendEnvelopeWithStatus

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

```
public String sendEnvelopeWithStatus (String content)
```

Send ENVELOPE to the SIM and return the response.

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


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

<br />

| Parameters ||
|---|---|
| `content` | `String`: String containing SAT/USAT response in hexadecimal format starting with command tag. See TS 102 223 for details. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The APDU response from the ICC card in hexadecimal format with the last 4 bytes being the status word. If the command fails, returns an empty string. <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_SUBSCRIPTION`. |

### sendUssdRequest

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

```
public void sendUssdRequest (String ussdRequest, 
                TelephonyManager.UssdResponseCallback callback, 
                Handler handler)
```

Sends an Unstructured Supplementary Service Data (USSD) request to the mobile network and
informs the caller of the response via the supplied `callback`.

Carriers define USSD codes which can be sent by the user to request information such as
the user's current data balance or minutes balance.

Note: Call forwarding USSD requests are restricted to protect user security. Callers must
have carrier privileges, be a system app, hold the call screening role, hold the device
policy management role, or be running on a fully managed device to perform these actions.
Otherwise, the request will fail and the callback will be invoked with
`https://developer.android.com/reference/android/telephony/TelephonyManager#USSD_ERROR_NOT_ALLOWED`.

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


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


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

<br />

| Parameters ||
|---|---|
| `ussdRequest` | `String`: the USSD command to be executed. <br /> |
| `callback` | `TelephonyManager.UssdResponseCallback`: called by the framework to inform the caller of the result of executing the USSD request (see `https://developer.android.com/reference/android/telephony/TelephonyManager.UssdResponseCallback`). <br /> |
| `handler` | `Handler`: the `https://developer.android.com/reference/android/os/Handler` to run the request on. <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_RADIO_ACCESS`. |

### sendVisualVoicemailSms

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

```
public void sendVisualVoicemailSms (String number, 
                int port, 
                String text, 
                PendingIntent sentIntent)
```

Send a visual voicemail SMS. The caller must be the current default dialer.
A `https://developer.android.com/reference/android/telephony/VisualVoicemailService` uses this method to send a command via SMS to the carrier's
visual voicemail server. Some examples for carriers using the OMTP standard include
activating and deactivating visual voicemail, or requesting the current visual voicemail
provisioning status. See the OMTP Visual Voicemail specification for more information on the
format of these SMS messages.

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


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

<br />

| Parameters ||
|---|---|
| `number` | `String`: The destination number. <br /> |
| `port` | `int`: The destination port for data SMS, or 0 for text SMS. <br /> |
| `text` | `String`: The message content. For data sms, it will be encoded as a UTF-8 byte stream. <br /> |
| `sentIntent` | `PendingIntent`: The sent intent passed to the `https://developer.android.com/reference/android/telephony/SmsManager` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller is not the current default dialer |
| `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_CALLING`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/SmsManager#sendDataMessage(java.lang.String,%20java.lang.String,%20short,%20byte[],%20android.app.PendingIntent,%20android.app.PendingIntent)`
- `https://developer.android.com/reference/android/telephony/SmsManager#sendTextMessage(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.app.PendingIntent,%20android.app.PendingIntent)`

### setAllowedNetworkTypesForReason

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

```
public void setAllowedNetworkTypesForReason (int reason, 
                long allowedNetworkTypes)
```

Set the allowed network types of the device and provide the reason triggering the allowed
network change.

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

This can be called for following reasons:

1. Allowed network types control by USER `https://developer.android.com/reference/android/telephony/TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER`
2. Allowed network types control by carrier `https://developer.android.com/reference/android/telephony/TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER`

This API will result in allowing an intersection of allowed network types for all reasons, including the configuration done through other reasons.   
Requires `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE`   
Requires the TelephonyManager#CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK feature which can be detected using `https://developer.android.com/reference/android/telephony/TelephonyManager#isRadioInterfaceCapabilitySupported(java.lang.String)`.

<br />

<br />

| Parameters ||
|---|---|
| `reason` | `int`: the reason the allowed network type change is taking place. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER` - `https://developer.android.com/reference/android/telephony/TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER` |
| `allowedNetworkTypes` | `long`: The bitmask of allowed network type. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_UNKNOWN` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_GSM` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_GPRS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EDGE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_CDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_1xRTT` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_0` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_A` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EVDO_B` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_EHRPD` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSUPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSDPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSPA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_HSPAP` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_UMTS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_TD_SCDMA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_LTE_CA` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_NR` - `https://developer.android.com/reference/android/telephony/TelephonyManager#NETWORK_TYPE_BITMASK_IWLAN` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if invalid AllowedNetworkTypesReason is passed. |
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the Telephony process is not currently available. |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not have the required privileges or if the |
| `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_RADIO_ACCESS`. caller tries to use one of the following security-based reasons without `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` permissions. 1. `TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G` |
| `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_RADIO_ACCESS`. |

### setCallComposerStatus

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

```
public void setCallComposerStatus (int status)
```

Set the user-set status for enriched calling with call composer.


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


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

<br />

| Parameters ||
|---|---|
| `status` | `int`: user-set status for enriched calling with call composer. If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()` Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_ON` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_OFF` - `https://developer.android.com/reference/android/telephony/TelephonyManager#CALL_COMPOSER_STATUS_BUSINESS_ONLY` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if requested state is invalid. |
| `https://developer.android.com/reference/java/lang/SecurityException` | if the caller does not have the permission. |
| `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_CALLING`. |

### setDataEnabled

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

```
public void setDataEnabled (boolean enable)
```


**This method was deprecated
in API level 31.**   

use setDataEnabledForReason with reason DATA_ENABLED_REASON_USER instead.

Turns mobile data on or off.
If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the given
subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultDataSubscriptionId()`

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_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#MODIFY_PHONE_STATE`


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

<br />

| Parameters ||
|---|---|
| `enable` | `boolean`: Whether to enable mobile data. <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_DATA`. |

### setDataEnabledForReason

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

```
public void setDataEnabledForReason (int reason, 
                boolean enabled)
```

Control of data connection and provide the reason triggering the data connection control.
This can be called for following reasons

1. data limit is passed `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_POLICY`
2. data disabled by carrier `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_CARRIER`
3. data disabled by user `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_USER`
4. data disabled due to thermal `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_THERMAL`

If any of the reason is off, then it will result in bypassing user preference and result in data to be turned off.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies
to the given subId. Otherwise, applies to
`https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultDataSubscriptionId()`


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


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

<br />

| Parameters ||
|---|---|
| `reason` | `int`: the reason the data enable change is taking place. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_USER` - `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_POLICY` - `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_CARRIER` - `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_THERMAL` |
| `enabled` | `boolean`: True if enabling the data, otherwise disabling. Requires Permission: The calling app has carrier privileges (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`) if the reason is `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_USER` or `https://developer.android.com/reference/android/telephony/TelephonyManager#DATA_ENABLED_REASON_CARRIER`, or the calling app has `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` irrespective of the reason. |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the Telephony process is not currently available. |
| `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_DATA`. |

### setForbiddenPlmns

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

```
public int setForbiddenPlmns (List<String> fplmns)
```

Replace the contents of the forbidden PLMN SIM file with the provided values.
Passing an empty list will clear the contents of the EFfplmn file.
If the provided list is shorter than the size of EFfplmn, then the list will be padded
up to the file size with 'FFFFFF'. (required by 3GPP TS 31.102 spec 4.2.16)
If the list is longer than the size of EFfplmn, then the file will be written from the
beginning of the list up to the file size.

Requires Permission: `https://developer.android.com/reference/android/Manifest.permission#MODIFY_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#MODIFY_PHONE_STATE`


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

<br />

| Parameters ||
|---|---|
| `fplmns` | `List`: a list of PLMNs to be forbidden. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int` | number of PLMNs that were successfully written to the SIM FPLMN list. This may be less than the number of PLMNs passed in where the SIM file does not have enough room for all of the values passed in. Return -1 in the event of an unexpected failure <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_SUBSCRIPTION`. |

### setLine1NumberForDisplay

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

```
public boolean setLine1NumberForDisplay (String alphaTag, 
                String number)
```


**This method was deprecated
in API level 33.**   

use `https://developer.android.com/reference/android/telephony/SubscriptionManager#setCarrierPhoneNumber(int,%20java.lang.String)` instead.

Set the line 1 phone number string and its alphatag for the current ICCID
for display purpose only, for example, displayed in Phone Status. It won't
change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
value.

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


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

<br />

| Parameters ||
|---|---|
| `alphaTag` | `String`: alpha-tagging of the dailing nubmer <br /> |
| `number` | `String`: The dialing number <br /> |

| Returns ||
|---|---|
| `boolean` | true if the operation was executed correctly. <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_SUBSCRIPTION`. |

### setNetworkSelectionModeAutomatic

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

```
public void setNetworkSelectionModeAutomatic ()
```

Sets the network selection mode to automatic.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_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#MODIFY_PHONE_STATE`


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

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

### setNetworkSelectionModeManual

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

```
public boolean setNetworkSelectionModeManual (String operatorNumeric, 
                boolean persistSelection, 
                int ran)
```

Ask the radio to connect to the input network and change selection mode to manual.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_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#MODIFY_PHONE_STATE`


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

<br />

| Parameters ||
|---|---|
| `operatorNumeric` | `String`: the PLMN ID of the network to select. This value cannot be `null`. <br /> |
| `persistSelection` | `boolean`: whether the selection will persist until reboot. If true, only allows attaching to the selected PLMN until reboot; otherwise, attach to the chosen PLMN and resume normal network selection next time. <br /> |
| `ran` | `int`: the initial suggested radio access network type. If registration fails, the RAN is not available after, the RAN is not within the network types specified by the preferred network types, or the value is `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#UNKNOWN`, modem will select the next best RAN for network registration. Value is one of the following: - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#UNKNOWN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#GERAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#UTRAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#EUTRAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#CDMA2000` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#IWLAN` - `https://developer.android.com/reference/android/telephony/AccessNetworkConstants.AccessNetworkType#NGRAN` |

| Returns ||
|---|---|
| `boolean` | `true` on success; `false` on any failure. <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_RADIO_ACCESS`. |

### setNetworkSelectionModeManual

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

```
public boolean setNetworkSelectionModeManual (String operatorNumeric, 
                boolean persistSelection)
```

Ask the radio to connect to the input network and change selection mode to manual.

If this object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`, applies to the
given subId. Otherwise, applies to `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`

Requires Permission:
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_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#MODIFY_PHONE_STATE`


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

<br />

| Parameters ||
|---|---|
| `operatorNumeric` | `String`: the PLMN ID of the network to select. <br /> |
| `persistSelection` | `boolean`: whether the selection will persist until reboot. If true, only allows attaching to the selected PLMN until reboot; otherwise, attach to the chosen PLMN and resume normal network selection next time. For devices launching with `https://developer.android.com/reference/android/os/Build.VERSION_CODES#BAKLAVA`, this API will return `true` if the setting is applied successfully, regardless of whether attaching to the network is successful. Previously this behavior was ambiguous. For all hardware versions callers may always call `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSelectionMode()` to unambiguously determine the state of the setting subsequent to calling `https://developer.android.com/reference/android/telephony/TelephonyManager#setNetworkSelectionModeManual(java.lang.String,%20boolean)`. Regardless of the API level, rather than relying on the result of this method, callers should monitor `https://developer.android.com/reference/android/telephony/ServiceState` for the state of network registration; they may also monitor `https://developer.android.com/reference/android/telephony/ServiceState#getIsManualSelection()` for state changes in real time. |

| Returns ||
|---|---|
| `boolean` | `true` if the settings is successful; `false` if the setting fails. <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_RADIO_ACCESS`. |

### setOperatorBrandOverride

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

```
public boolean setOperatorBrandOverride (String brand)
```

Override the branding for the current ICCID.

Once set, whenever the SIM is present in the device, the service
provider name (SPN) and the operator name will both be replaced by the
brand value input. To unset the value, the same function should be
called with a null brand value.

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


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

<br />

| Parameters ||
|---|---|
| `brand` | `String`: The brand name to display/set. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the operation was executed correctly. <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_SUBSCRIPTION`. |

### setPreferredNetworkTypeToGlobal

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

```
public boolean setPreferredNetworkTypeToGlobal ()
```

Set the preferred network type to global mode which includes NR, LTE, CDMA, EvDo
and GSM/WCDMA.

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


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

<br />

| Returns ||
|---|---|
| `boolean` | true on success; false on any failure. <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_RADIO_ACCESS`. |

### setPreferredOpportunisticDataSubscription

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

```
public void setPreferredOpportunisticDataSubscription (int subId, 
                boolean needValidation, 
                Executor executor, 
                Consumer<Integer> callback)
```

Set preferred opportunistic data subscription id.

Switch internet data to preferred opportunistic data subscription id. This api
can result in lose of internet connectivity for short period of time while internet data
is handed over.

Requires that the calling app has carrier privileges on both primary and
secondary subscriptions (see
`https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`), or has permission
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE`.


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

<br />

| Parameters ||
|---|---|
| `subId` | `int`: which opportunistic subscription `https://developer.android.com/reference/android/telephony/SubscriptionManager#getOpportunisticSubscriptions()` is preferred for cellular data. Pass `https://developer.android.com/reference/android/telephony/SubscriptionManager#DEFAULT_SUBSCRIPTION_ID` to unset the preference <br /> |
| `needValidation` | `boolean`: whether validation is needed before switch happens. <br /> |
| `executor` | `Executor`: The executor of where the callback will execute. This value may 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 /> |
| `callback` | `Consumer`: Callback will be triggered once it succeeds or failed. See the `SET_OPPORTUNISTIC_SUB_*` constants for more details. Pass null if don't care about the result. <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_DATA`. |

### setSignalStrengthUpdateRequest

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

```
public void setSignalStrengthUpdateRequest (SignalStrengthUpdateRequest request)
```

Set a `https://developer.android.com/reference/android/telephony/SignalStrengthUpdateRequest` to receive notification when signal quality
measurements breach the specified thresholds.

To be notified, set the signal strength update request and then register
`https://developer.android.com/reference/android/telephony/TelephonyCallback` that implements `https://developer.android.com/reference/android/telephony/TelephonyCallback.SignalStrengthsListener`
through `https://developer.android.com/reference/android/telephony/TelephonyManager#registerTelephonyCallback(int,%20java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)`. The notification will arrive through
`https://developer.android.com/reference/android/telephony/TelephonyCallback.SignalStrengthsListener#onSignalStrengthsChanged(android.telephony.SignalStrength)`.

To stop receiving the notification over the specified thresholds, pass the same
`https://developer.android.com/reference/android/telephony/SignalStrengthUpdateRequest` object to
`https://developer.android.com/reference/android/telephony/TelephonyManager#clearSignalStrengthUpdateRequest(android.telephony.SignalStrengthUpdateRequest)`.

System will clean up the `https://developer.android.com/reference/android/telephony/SignalStrengthUpdateRequest` if the caller process died
without calling `https://developer.android.com/reference/android/telephony/TelephonyManager#clearSignalStrengthUpdateRequest(android.telephony.SignalStrengthUpdateRequest)`.

If this TelephonyManager object has been created with `https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`,
applies to the given subId. Otherwise, applies to
`https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSubscriptionId()`. To request for multiple subIds,
pass a request object to each TelephonyManager object created with
`https://developer.android.com/reference/android/telephony/TelephonyManager#createForSubscriptionId(int)`.

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

Note that the thresholds in the request will be used on a best-effort basis; the system may
modify requests to multiplex various request sources or to optimize power consumption. The
caller should not expect to be notified with the exactly the same thresholds.


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


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

<br />

| Parameters ||
|---|---|
| `request` | `SignalStrengthUpdateRequest`: the SignalStrengthUpdateRequest to be set into the System. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if a new request is set with same subId from the same caller |
| `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_RADIO_ACCESS`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#clearSignalStrengthUpdateRequest(android.telephony.SignalStrengthUpdateRequest)`

### setVisualVoicemailSmsFilterSettings

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

```
public void setVisualVoicemailSmsFilterSettings (VisualVoicemailSmsFilterSettings settings)
```

Set the visual voicemail SMS filter settings for the subscription ID pinned
to the TelephonyManager.
When the filter is enabled, `https://developer.android.com/reference/android/telephony/VisualVoicemailService#onSmsReceived(android.telephony.VisualVoicemailService.VisualVoicemailTask,%20android.telephony.VisualVoicemailSms)` will be
called when a SMS matching the settings is received. Caller must be the default dialer,
system dialer, or carrier visual voicemail app.


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

<br />

| Parameters ||
|---|---|
| `settings` | `VisualVoicemailSmsFilterSettings`: The settings for the filter, or `null` to disable the filter. <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_CALLING`. |

**See also:**

- `https://developer.android.com/reference/android/telecom/TelecomManager#getDefaultDialerPackage()`
- `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY`

### setVoiceMailNumber

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

```
public boolean setVoiceMailNumber (String alphaTag, 
                String number)
```

Sets the voice mail number.

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


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

<br />

| Parameters ||
|---|---|
| `alphaTag` | `String`: The alpha tag to display. <br /> |
| `number` | `String`: The voicemail number. <br /> |

| Returns ||
|---|---|
| `boolean` | <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_CALLING`. |

### setVoicemailRingtoneUri

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

```
public void setVoicemailRingtoneUri (PhoneAccountHandle phoneAccountHandle, 
                Uri uri)
```


**This method was deprecated
in API level 28.**   

Use `https://developer.android.com/reference/android/provider/Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS`
instead.

Sets the per-account voicemail ringtone.

Requires that the calling app is the default dialer, or has carrier privileges (see
`https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`, or has permission
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE`.


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

<br />

| Parameters ||
|---|---|
| `phoneAccountHandle` | `PhoneAccountHandle`: The handle for the `https://developer.android.com/reference/android/telecom/PhoneAccount` for which to set the voicemail ringtone. <br /> |
| `uri` | `Uri`: The URI for the ringtone to play when receiving a voicemail from a specific PhoneAccount. <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_CALLING`. |

### setVoicemailVibrationEnabled

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

```
public void setVoicemailVibrationEnabled (PhoneAccountHandle phoneAccountHandle, 
                boolean enabled)
```


**This method was deprecated
in API level 28.**   

Use `https://developer.android.com/reference/android/provider/Settings#ACTION_CHANNEL_NOTIFICATION_SETTINGS`
instead.

Sets the per-account preference whether vibration is enabled for voicemail notifications.

Requires that the calling app is the default dialer, or has carrier privileges (see
`https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`, or has permission
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE`.


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

<br />

| Parameters ||
|---|---|
| `phoneAccountHandle` | `PhoneAccountHandle`: The handle for the `https://developer.android.com/reference/android/telecom/PhoneAccount` for which to set the voicemail vibration setting. <br /> |
| `enabled` | `boolean`: Whether to enable or disable vibration for voicemail notifications from a specific PhoneAccount. <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_CALLING`. |

### switchMultiSimConfig

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

```
public void switchMultiSimConfig (int numOfSims)
```

Switch configs to enable multi-sim or switch back to single-sim

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

Note: with only carrier privileges, it is not allowed to switch from multi-sim
to single-sim.


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


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

<br />

| Parameters ||
|---|---|
| `numOfSims` | `int`: number of live SIMs we want to switch to <br /> |

| Throws ||
|---|---|
|   | android.os.RemoteException |
| `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_SUBSCRIPTION`. |

### unregisterTelephonyCallback

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

```
public void unregisterTelephonyCallback (TelephonyCallback callback)
```

Unregister an existing `https://developer.android.com/reference/android/telephony/TelephonyCallback`.

<br />

| Parameters ||
|---|---|
| `callback` | `TelephonyCallback`: The `https://developer.android.com/reference/android/telephony/TelephonyCallback` object to unregister. This value cannot be `null`. <br /> |

### updateAvailableNetworks

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

```
public void updateAvailableNetworks (List<AvailableNetworkInfo> availableNetworks, 
                Executor executor, 
                Consumer<Integer> callback)
```

Update availability of a list of networks in the current location.

This api should be called to inform OpportunisticNetwork Service about the availability
of a network at the current location. This information will be used by OpportunisticNetwork
service to enable modem stack and to attach to the network. If an empty list is passed,
it is assumed that no network is available and will result in disabling the modem stack
to save power. This api do not switch internet data once network attach is completed.
Use `https://developer.android.com/reference/android/telephony/TelephonyManager#setPreferredOpportunisticDataSubscription(int,%20boolean,%20java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Integer>)`
to switch internet data after network attach is complete.
Requires that the calling app has carrier privileges on both primary and
secondary subscriptions (see `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`), or has permission
`https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE`.


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

<br />

| Parameters ||
|---|---|
| `availableNetworks` | `List`: is a list of available network information. This value cannot be `null`. <br /> |
| `executor` | `Executor`: The executor of where the callback will execute. This value may 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 /> |
| `callback` | `Consumer`: Callback will be triggered once it succeeds or failed. Value is one of the following: - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_SUCCESS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_UNKNOWN_FAILURE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_ABORTED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_INVALID_ARGUMENTS` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_NO_CARRIER_PRIVILEGE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_DISABLE_MODEM_FAIL` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_ENABLE_MODEM_FAIL` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_MULTIPLE_NETWORKS_NOT_SUPPORTED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_NO_OPPORTUNISTIC_SUB_AVAILABLE` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_REMOTE_SERVICE_EXCEPTION` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_SERVICE_IS_DISABLED` - `https://developer.android.com/reference/android/telephony/TelephonyManager#UPDATE_AVAILABLE_NETWORKS_SIM_PORT_NOT_AVAILABLE` . This value may be `null`. |

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

### uploadCallComposerPicture

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

```
public void uploadCallComposerPicture (InputStream pictureToUpload, 
                String contentType, 
                Executor executor, 
                OutcomeReceiver<ParcelUuid, TelephonyManager.CallComposerException> callback)
```

Uploads a picture to the carrier network for use with call composer.

This method allows a dialer app to upload a picture to the carrier network that can then
later be attached to an outgoing call. In order to attach the picture to a call, use the
`https://developer.android.com/reference/android/os/ParcelUuid` returned from `callback` upon successful upload as the value to
`https://developer.android.com/reference/android/telecom/TelecomManager#EXTRA_OUTGOING_PICTURE`.

This functionality is only available to the app filling the `https://developer.android.com/reference/android/app/role/RoleManager#ROLE_DIALER`
role on the device.

This functionality is only available when
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_SUPPORTS_CALL_COMPOSER_BOOL` is set to `true` in the
bundle returned from `https://developer.android.com/reference/android/telephony/TelephonyManager#getCarrierConfig()`.


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

<br />

| Parameters ||
|---|---|
| `pictureToUpload` | `InputStream`: An `https://developer.android.com/reference/java/io/InputStream` that supplies the bytes representing the picture to upload. The client bears responsibility for closing this stream after `callback` is called with success or failure. Additionally, if the stream supplies more bytes than the return value of `https://developer.android.com/reference/android/telephony/TelephonyManager#getMaximumCallComposerPictureSize()`, the upload will be aborted and the callback will be called with an exception containing `https://developer.android.com/reference/android/telephony/TelephonyManager.CallComposerException#ERROR_FILE_TOO_LARGE`. This value cannot be `null`. <br /> |
| `contentType` | `String`: The MIME type of the picture you're uploading (e.g. image/jpeg). The list of acceptable content types can be found at 3GPP TS 26.141 sections 4.2 and 4.3. This value cannot be `null`. <br /> |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `pictureToUpload` stream will be read, as well as on which the callback will be called. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: A callback called when the upload operation terminates, either in success or in error. 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_CALLING`. |

### uploadCallComposerPicture

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

```
public void uploadCallComposerPicture (Path pictureToUpload, 
                String contentType, 
                Executor executor, 
                OutcomeReceiver<ParcelUuid, TelephonyManager.CallComposerException> callback)
```

Uploads a picture to the carrier network for use with call composer.


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

<br />

| Parameters ||
|---|---|
| `pictureToUpload` | `Path`: Path to a local file containing the picture to upload. This value cannot be `null`. <br /> |
| `contentType` | `String`: The MIME type of the picture you're uploading (e.g. image/jpeg). This value cannot be `null`. <br /> |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `pictureToUpload` file will be read from disk, as well as on which `callback` will be called. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: A callback called when the upload operation terminates, either in success or in error. 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_CALLING`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/TelephonyManager#uploadCallComposerPicture(java.io.InputStream,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.os.ParcelUuid,android.telephony.TelephonyManager.CallComposerException>)`