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

# SmsManager

*** ** * ** ***


`
public

final

class
SmsManager
`


`

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


`

`


`

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

<br />

*** ** * ** ***

Manages SMS operations such as sending data, text, and pdu SMS messages.
Get this object by calling the static method `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`. To create an instance of
`https://developer.android.com/reference/android/telephony/SmsManager` associated with a specific subscription ID, call
`https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)`. This is typically used for devices that support
multiple active subscriptions at once.

For information about how to behave as the default SMS app on Android 4.4 (API level 19)
and higher, see `https://developer.android.com/reference/android/provider/Telephony`.


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)`.
**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionManager#getActiveSubscriptionInfoList()`

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/telephony/SmsManager.FinancialSmsCallback` callback for providing asynchronous sms messages for financial app. |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#EXTRA_MMS_DATA` Intent extra name for MMS sending result data in byte array type |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#EXTRA_MMS_HTTP_STATUS` Intent extra name for HTTP status code for MMS HTTP failure in integer type |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_ALIAS_ENABLED` Whether alias is enabled (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_ALIAS_MAX_CHARS` Max alias character count (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_ALIAS_MIN_CHARS` Min alias character count (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_ALLOW_ATTACH_AUDIO` Whether audio is allowed to be attached for MMS messages (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_APPEND_TRANSACTION_ID` Whether to append transaction id to MMS WAP Push M-Notification.ind's content location URI when constructing the download URL of a new MMS (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_EMAIL_GATEWAY_NUMBER` Email gateway number (String type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_GROUP_MMS_ENABLED` Whether group MMS is enabled for the current carrier (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_HTTP_PARAMS` A list of HTTP headers to add to MMS HTTP request, separated by "\|" (String type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_HTTP_SOCKET_TIMEOUT` MMS HTTP socket timeout in milliseconds (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_MAX_IMAGE_HEIGHT` Max MMS image height (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_MAX_IMAGE_WIDTH` Max MMS image width (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_MAX_MESSAGE_SIZE` Max MMS message size in bytes (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_MESSAGE_TEXT_MAX_SIZE` Max message text size (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_MMS_DELIVERY_REPORT_ENABLED` Whether MMS delivery report is enabled (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_MMS_ENABLED` Whether MMS is enabled for the current carrier (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_MMS_READ_REPORT_ENABLED` Whether MMS read report is enabled (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_MULTIPART_SMS_ENABLED` Whether multipart SMS is enabled (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_NAI_SUFFIX` The suffix to append to the NAI header value for MMS HTTP request (String type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_NOTIFY_WAP_MMSC_ENABLED` If this is enabled, M-NotifyResp.ind should be sent to the WAP Push content location instead of the default MMSC (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_RECIPIENT_LIMIT` Limit of recipients of MMS messages (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES` Whether multipart SMS should be sent as separate messages |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_SHOW_CELL_BROADCAST_APP_LINKS` If true, show the cell broadcast (amber alert) in the SMS settings. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_SMS_DELIVERY_REPORT_ENABLED` Whether SMS delivery report is enabled (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD` Some carriers require SMS to be converted into MMS when text length reaches this threshold (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD` When the number of parts of a multipart SMS reaches this threshold, it should be converted into an MMS (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_SUBJECT_MAX_LENGTH` Max message subject length (int type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_SUPPORT_HTTP_CHARSET_HEADER` Whether the carrier MMSC supports charset field in Content-Type header. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION` Whether content-disposition field should be expected in an MMS PDU (boolean type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_UA_PROF_TAG_NAME` The name of the UA Prof URL HTTP header for MMS HTTP request (String type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_UA_PROF_URL` The UA Profile URL header value for MMS HTTP request (String type) |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_CONFIG_USER_AGENT` The User-Agent header value for MMS HTTP request (String type) |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_CONFIGURATION_ERROR` The carrier-dependent configuration values could not be loaded. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_DATA_DISABLED` Data is disabled for the MMS APN. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_HTTP_FAILURE` An error occurred during the HTTP client setup. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_INACTIVE_SUBSCRIPTION` The subscription id for the send/download is inactive. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_INVALID_APN` ApnException occurred during MMS network setup. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_INVALID_SUBSCRIPTION_ID` The subscription id for the send/download is invalid. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_IO_ERROR` An I/O error occurred reading the PDU. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_MMS_DISABLED_BY_CARRIER` MMS is disabled by a carrier. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_NO_DATA_NETWORK` There is neither Wi-Fi nor mobile data network. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_RETRY` An error occurred while retrying sending/downloading the MMS. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_UNABLE_CONNECT_MMS` An error occurred during the MMS connection setup. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#MMS_ERROR_UNSPECIFIED` Unspecific MMS error occurred during send/download. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_BLUETOOTH_DISCONNECTED` Failed sending via bluetooth because bluetooth disconnected |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_CANCELLED` Failed because the operation was cancelled |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ENCODING_ERROR` Failed because of an encoding error |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_FDN_CHECK_FAILURE` Failed because FDN is enabled. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_GENERIC_FAILURE` Generic failure cause |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_LIMIT_EXCEEDED` Failed because we reached the sending queue limit. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_NONE` No error. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_NO_SERVICE` Failed because service is currently unavailable |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_NULL_PDU` Failed because no pdu provided |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_RADIO_OFF` Failed because radio was explicitly turned off |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED` Failed because the user has denied this app ever send premium short codes. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_ERROR_SHORT_CODE_NOT_ALLOWED` Failed because user denied the sending of this short code. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_INTERNAL_ERROR` Failed because of an internal error |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_INVALID_ARGUMENTS` Failed because of invalid arguments |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_INVALID_BLUETOOTH_ADDRESS` Failed sending via bluetooth because the bluetooth device address is invalid |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_INVALID_SMSC_ADDRESS` Failed because of an invalid smsc address |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_INVALID_SMS_FORMAT` Failed because the sms format is not valid |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_INVALID_STATE` Failed because of an invalid state |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_MODEM_ERROR` Failed because of a modem error |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_NETWORK_ERROR` Failed because of a network error |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_NETWORK_REJECT` Failed because of network rejection |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_NO_BLUETOOTH_SERVICE` Failed sending via bluetooth because the bluetooth service is not available |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_NO_DEFAULT_SMS_APP` Set by BroadcastReceiver to indicate there's no default sms app. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_NO_MEMORY` Failed because there is no memory |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_NO_RESOURCES` Failed because there are no resources |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_OPERATION_NOT_ALLOWED` Failed because the operation is not allowed |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RADIO_NOT_AVAILABLE` Failed because the radio was not available |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RECEIVE_DISPATCH_FAILURE` SMS receive dispatch failure. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RECEIVE_INJECTED_NULL_PDU` SMS receive injected null PDU. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RECEIVE_NULL_MESSAGE_FROM_RIL` SMS received null message from the radio interface layer. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RECEIVE_RUNTIME_EXCEPTION` SMS receive encountered runtime exception. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RECEIVE_SQL_EXCEPTION` SMS receive encountered an SQL exception. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RECEIVE_URI_EXCEPTION` SMS receive an exception parsing a uri. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RECEIVE_WHILE_ENCRYPTED` SMS short code received while the phone is in encrypted state. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_REMOTE_EXCEPTION` Set by BroadcastReceiver to indicate a remote exception while handling a message. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_REQUEST_NOT_SUPPORTED` Failed because the request is not supported |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_ABORTED` Operation aborted |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_ACCESS_BARRED` Access is barred. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_BLOCKED_DUE_TO_CALL` SMS is blocked due to call control, e.g., resource unavailable in the SMR entity. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_CANCELLED` The request has been cancelled. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_DEVICE_IN_USE` Operation cannot be performed because the device is currently in use |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_ENCODING_ERR` The SMS message was not encoded properly. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_GENERIC_ERROR` A RIL error occurred during the SMS send. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_INTERNAL_ERR` The modem encountered an unexpected error scenario while handling the request. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_INVALID_ARGUMENTS` The radio received invalid arguments in the request. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_INVALID_MODEM_STATE` The radio cannot process the request in the current modem state. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_INVALID_RESPONSE` A RIL internal error when one of the RIL layers receives an unrecognized response from a lower layer. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_INVALID_SIM_STATE` Cannot process the request in current SIM state |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_INVALID_SMSC_ADDRESS` The specified SMSC address was invalid. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_INVALID_SMS_FORMAT` The radio returned an error indicating invalid sms format. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_INVALID_STATE` The radio returned an unexpected request for the current state. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_MODEM_ERR` The vendor RIL received an unexpected or incorrect response. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_NETWORK_ERR` The radio received an error from the network. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_NETWORK_NOT_READY` The network is not ready to perform the request. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_NETWORK_REJECT` The sms request was rejected by the network. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_NO_MEMORY` The radio didn't have sufficient memory to process the request. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_NO_NETWORK_FOUND` Network cannot be found |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_NO_RESOURCES` There are insufficient resources to process the request. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_NO_SMS_TO_ACK` ACK received when there is no SMS to ack |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_NO_SUBSCRIPTION` Device does not have subscription |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_OPERATION_NOT_ALLOWED` The radio reports the request is not allowed. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_RADIO_NOT_AVAILABLE` The radio did not start or is resetting. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_REQUEST_NOT_SUPPORTED` The request was not supported by the radio. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_REQUEST_RATE_LIMITED` The radio denied the operation due to overly-frequent requests. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED` 1X voice and SMS are not allowed simultaneously. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SIM_ABSENT` The radio failed to set the location where the CDMA subscription can be retrieved because the SIM or RUIM is absent. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SIM_BUSY` SIM is busy |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SIM_ERROR` Received error from SIM card |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SIM_FULL` The target EF is full |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SIM_PIN2` Operation requires SIM PIN2 to be entered |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SIM_PUK2` Operation requires SIM PUK2 to be entered |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SMS_SEND_FAIL_RETRY` The radio failed to send the sms and needs to retry. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SUBSCRIPTION_NOT_AVAILABLE` Fail to find CDMA subscription from specified location |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_RIL_SYSTEM_ERR` The radio encountered a platform or system error. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_SMS_BLOCKED_DURING_EMERGENCY` Failed sending during an emergency call |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_SMS_SEND_FAILED_AFTER_MAX_RETRY` Indicates that the SMS sending operation failed because all allowed retry attempts were exhausted without successfully sending the message. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_SMS_SEND_RETRY_FAILED` Failed to send an sms retry |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_SYSTEM_ERROR` Failed because of a system error |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_UNEXPECTED_EVENT_STOP_SENDING` Failed sending because the user denied or canceled the dialog displayed for a premium shortcode sms or rate-limited sms. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_USER_NOT_ALLOWED` User is not associated with the subscription. |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_CALL_BARRING` RP-Cause Value for Call Barring |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_CONGESTION` RP-Cause Value for SMS Failure due to Congestion in network |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_DESTINATION_OUT_OF_ORDER` RP-Cause Value for Destination is Out of Order |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED` RP-Cause Value when network does not provide the received service |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED` RP-Cause Value when SMS Facilty is not subscribed by Reote device |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_FACILITY_REJECTED` RP-Cause Value when SMS Facility if Rejected by Operator |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT` RP-Cause Value when network does not provide the received service |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_INTERWORKING_UNSPECIFIED` RP-Cause Value when network does not provide the received service |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_INVALID_MANDATORY_INFORMATION` RP-Cause Value when network does not provide the received service |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_INVALID_MESSAGE_REFERENCE_VALUE` RP-Cause Value when RP-MessageRefere |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_MESSAGE_INCOMPATIBLE_WITH_PROTOCOL_STATE` RP-Cause Value when network does not provide the received service |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_MESSAGE_TYPE_NON_EXISTENT` RP-Cause Value when network does not provide the received service |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_NETWORK_OUT_OF_ORDER` RP-Cause Value when network is out of order |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_OPERATOR_DETERMINED_BARRING` RP-Cause for Operator Barring |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_PROTOCOL_ERROR` RP-Cause Value when network does not provide the received service |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_RESERVED` RP-Cause value for Reserved Number |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_RESOURCES_UNAVAILABLE` RP-Cause Value when Network Resources are unavailable |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE` RP-Cause Value when network does not provide the received service |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_SHORT_MESSAGE_TRANSFER_REJECTED` RP-Cause Value for Message Transfer Rejected by Network |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_TEMPORARY_FAILURE` RP-Cause Value For Temporary failure |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_UNALLOCATED_NUMBER` Unallocated Number Cause |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER` RP-Cause Value when Subscriber is not Identified |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#SMS_RP_CAUSE_UNKNOWN_SUBSCRIBER` RP-Cause Value when Subscriber is not Identified |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#STATUS_ON_ICC_FREE` Free space (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27). |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#STATUS_ON_ICC_READ` Received and read (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27). |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#STATUS_ON_ICC_SENT` Stored and sent (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27). |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#STATUS_ON_ICC_UNREAD` Received and unread (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27). |
| `int` | `https://developer.android.com/reference/android/telephony/SmsManager#STATUS_ON_ICC_UNSENT` Stored and unsent (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27). |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/SmsManager#createAppSpecificSmsToken(android.app.PendingIntent)(https://developer.android.com/reference/android/app/PendingIntent intent) ` Create a single use app specific incoming SMS request for the calling package. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/SmsManager#createAppSpecificSmsTokenWithPackageInfo(java.lang.String,%20android.app.PendingIntent)(https://developer.android.com/reference/java/lang/String prefixes, https://developer.android.com/reference/android/app/PendingIntent intent) ` Create a single use app specific incoming SMS request for the calling package. |
| ` https://developer.android.com/reference/android/telephony/SmsManager` | ` https://developer.android.com/reference/android/telephony/SmsManager#createForSubscriptionId(int)(int subId) ` Get the instance of the SmsManager associated with a particular subscription ID. |
| ` https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/telephony/SmsManager#divideMessage(java.lang.String)(https://developer.android.com/reference/java/lang/String text) ` Divide a message text into several fragments, none bigger than the maximum SMS message size. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#downloadMultimediaMessage(android.content.Context,%20java.lang.String,%20android.net.Uri,%20android.os.Bundle,%20android.app.PendingIntent)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String locationUrl, https://developer.android.com/reference/android/net/Uri contentUri, https://developer.android.com/reference/android/os/Bundle configOverrides, https://developer.android.com/reference/android/app/PendingIntent downloadedIntent) ` Download an MMS message from carrier by a given location URL **Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this manager on a multi-SIM device, this operation may fail downloading the MMS message because no suitable default subscription could be found. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#downloadMultimediaMessage(android.content.Context,%20java.lang.String,%20android.net.Uri,%20android.os.Bundle,%20android.app.PendingIntent,%20long)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String locationUrl, https://developer.android.com/reference/android/net/Uri contentUri, https://developer.android.com/reference/android/os/Bundle configOverrides, https://developer.android.com/reference/android/app/PendingIntent downloadedIntent, long messageId) ` Download an MMS message from carrier by a given location URL Same as `https://developer.android.com/reference/android/telephony/SmsManager#downloadMultimediaMessage(android.content.Context,%20java.lang.String,%20android.net.Uri,%20android.os.Bundle,%20android.app.PendingIntent)`, but adds an optional messageId. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/telephony/SmsManager#getCarrierConfigValues()() ` Get carrier-dependent MMS configuration values. |
| ` static https://developer.android.com/reference/android/telephony/SmsManager` | ` https://developer.android.com/reference/android/telephony/SmsManager#getDefault()() ` *This method was deprecated in API level 31. Use `https://developer.android.com/reference/android/content/Context#getSystemService(java.lang.Class<T>)` instead* |
| ` static int` | ` https://developer.android.com/reference/android/telephony/SmsManager#getDefaultSmsSubscriptionId()() ` Get default sms subscription id. |
| ` int` | ` https://developer.android.com/reference/android/telephony/SmsManager#getSmsCapacityOnIcc()() ` Gets the total capacity of SMS storage on the SIM card. |
| ` static https://developer.android.com/reference/android/telephony/SmsManager` | ` https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)(int subId) ` *This method was deprecated in API level 31. Use `https://developer.android.com/reference/android/content/Context#getSystemService(java.lang.Class<T>)` .`https://developer.android.com/reference/android/telephony/SmsManager#createForSubscriptionId(int)` instead* |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#getSmsMessagesForFinancialApp(android.os.Bundle,%20java.util.concurrent.Executor,%20android.telephony.SmsManager.FinancialSmsCallback)(https://developer.android.com/reference/android/os/Bundle params, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/telephony/SmsManager.FinancialSmsCallback callback) ` Get SMS messages for the calling financial app. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/SmsManager#getSmscAddress()() ` Gets the SMSC address from (U)SIM. |
| ` int` | ` https://developer.android.com/reference/android/telephony/SmsManager#getSubscriptionId()() ` Get the associated subscription id. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#injectSmsPdu(byte[],%20java.lang.String,%20android.app.PendingIntent)(byte[] pdu, https://developer.android.com/reference/java/lang/String format, https://developer.android.com/reference/android/app/PendingIntent receivedIntent) ` Inject an SMS PDU into the android application framework. |
| ` void` | ` 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/java/lang/String destinationAddress, https://developer.android.com/reference/java/lang/String scAddress, short destinationPort, byte[] data, https://developer.android.com/reference/android/app/PendingIntent sentIntent, https://developer.android.com/reference/android/app/PendingIntent deliveryIntent) ` Send a data based SMS to a specific application port. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#sendMultimediaMessage(android.content.Context,%20android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.app.PendingIntent)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/net/Uri contentUri, https://developer.android.com/reference/java/lang/String locationUrl, https://developer.android.com/reference/android/os/Bundle configOverrides, https://developer.android.com/reference/android/app/PendingIntent sentIntent) ` Send an MMS message **Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this manager on a multi-SIM device, this operation may fail sending the MMS message because no suitable default subscription could be found. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#sendMultimediaMessage(android.content.Context,%20android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.app.PendingIntent,%20long)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/net/Uri contentUri, https://developer.android.com/reference/java/lang/String locationUrl, https://developer.android.com/reference/android/os/Bundle configOverrides, https://developer.android.com/reference/android/app/PendingIntent sentIntent, long messageId) ` Send an MMS message Same as `https://developer.android.com/reference/android/telephony/SmsManager#sendMultimediaMessage(android.content.Context,%20android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.app.PendingIntent)`, but adds an optional messageId. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#sendMultipartTextMessage(java.lang.String,%20java.lang.String,%20java.util.List<java.lang.String>,%20java.util.List<android.app.PendingIntent>,%20java.util.List<android.app.PendingIntent>,%20long)(https://developer.android.com/reference/java/lang/String destinationAddress, https://developer.android.com/reference/java/lang/String scAddress, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String> parts, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/PendingIntent> sentIntents, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/PendingIntent> deliveryIntents, long messageId) ` Send a multi-part text based SMS. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#sendMultipartTextMessage(java.lang.String,%20java.lang.String,%20java.util.ArrayList<java.lang.String>,%20java.util.ArrayList<android.app.PendingIntent>,%20java.util.ArrayList<android.app.PendingIntent>)(https://developer.android.com/reference/java/lang/String destinationAddress, https://developer.android.com/reference/java/lang/String scAddress, https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/String> parts, https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/app/PendingIntent> sentIntents, https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/app/PendingIntent> deliveryIntents) ` Send a multi-part text based SMS. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#sendMultipartTextMessage(java.lang.String,%20java.lang.String,%20java.util.List<java.lang.String>,%20java.util.List<android.app.PendingIntent>,%20java.util.List<android.app.PendingIntent>,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String destinationAddress, https://developer.android.com/reference/java/lang/String scAddress, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String> parts, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/PendingIntent> sentIntents, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/app/PendingIntent> deliveryIntents, https://developer.android.com/reference/java/lang/String packageName, https://developer.android.com/reference/java/lang/String attributionTag) ` Similar method as #sendMultipartTextMessage(String, String, ArrayList, ArrayList, ArrayList) With an additional argument. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#sendTextMessage(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.app.PendingIntent,%20android.app.PendingIntent,%20long)(https://developer.android.com/reference/java/lang/String destinationAddress, https://developer.android.com/reference/java/lang/String scAddress, https://developer.android.com/reference/java/lang/String text, https://developer.android.com/reference/android/app/PendingIntent sentIntent, https://developer.android.com/reference/android/app/PendingIntent deliveryIntent, long messageId) ` Send a text based SMS. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#sendTextMessage(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.app.PendingIntent,%20android.app.PendingIntent)(https://developer.android.com/reference/java/lang/String destinationAddress, https://developer.android.com/reference/java/lang/String scAddress, https://developer.android.com/reference/java/lang/String text, https://developer.android.com/reference/android/app/PendingIntent sentIntent, https://developer.android.com/reference/android/app/PendingIntent deliveryIntent) ` Send a text based SMS. |
| ` void` | ` https://developer.android.com/reference/android/telephony/SmsManager#sendTextMessageWithoutPersisting(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.app.PendingIntent,%20android.app.PendingIntent)(https://developer.android.com/reference/java/lang/String destinationAddress, https://developer.android.com/reference/java/lang/String scAddress, https://developer.android.com/reference/java/lang/String text, https://developer.android.com/reference/android/app/PendingIntent sentIntent, https://developer.android.com/reference/android/app/PendingIntent deliveryIntent) ` Send a text based SMS without writing it into the SMS Provider. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/SmsManager#setSmscAddress(java.lang.String)(https://developer.android.com/reference/java/lang/String smsc) ` Sets the SMSC address on (U)SIM. |

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

### EXTRA_MMS_DATA

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

```
public static final String EXTRA_MMS_DATA
```

Intent extra name for MMS sending result data in byte array type

<br />

Constant Value:

"android.telephony.extra.MMS_DATA"


### EXTRA_MMS_HTTP_STATUS

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

```
public static final String EXTRA_MMS_HTTP_STATUS
```

Intent extra name for HTTP status code for MMS HTTP failure in integer type

<br />

Constant Value:

"android.telephony.extra.MMS_HTTP_STATUS"


### MMS_CONFIG_ALIAS_ENABLED

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

```
public static final String MMS_CONFIG_ALIAS_ENABLED
```

Whether alias is enabled (boolean type)

<br />

Constant Value:

"aliasEnabled"


### MMS_CONFIG_ALIAS_MAX_CHARS

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

```
public static final String MMS_CONFIG_ALIAS_MAX_CHARS
```

Max alias character count (int type)

<br />

Constant Value:

"aliasMaxChars"


### MMS_CONFIG_ALIAS_MIN_CHARS

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

```
public static final String MMS_CONFIG_ALIAS_MIN_CHARS
```

Min alias character count (int type)

<br />

Constant Value:

"aliasMinChars"


### MMS_CONFIG_ALLOW_ATTACH_AUDIO

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

```
public static final String MMS_CONFIG_ALLOW_ATTACH_AUDIO
```

Whether audio is allowed to be attached for MMS messages (boolean type)

<br />

Constant Value:

"allowAttachAudio"


### MMS_CONFIG_APPEND_TRANSACTION_ID

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

```
public static final String MMS_CONFIG_APPEND_TRANSACTION_ID
```

Whether to append transaction id to MMS WAP Push M-Notification.ind's content location URI
when constructing the download URL of a new MMS (boolean type)

<br />

Constant Value:

"enabledTransID"


### MMS_CONFIG_EMAIL_GATEWAY_NUMBER

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

```
public static final String MMS_CONFIG_EMAIL_GATEWAY_NUMBER
```

Email gateway number (String type)

<br />

Constant Value:

"emailGatewayNumber"


### MMS_CONFIG_GROUP_MMS_ENABLED

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

```
public static final String MMS_CONFIG_GROUP_MMS_ENABLED
```

Whether group MMS is enabled for the current carrier (boolean type)

<br />

Constant Value:

"enableGroupMms"


### MMS_CONFIG_HTTP_PARAMS

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

```
public static final String MMS_CONFIG_HTTP_PARAMS
```

A list of HTTP headers to add to MMS HTTP request, separated by "\|" (String type)

<br />

Constant Value:

"httpParams"


### MMS_CONFIG_HTTP_SOCKET_TIMEOUT

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

```
public static final String MMS_CONFIG_HTTP_SOCKET_TIMEOUT
```

MMS HTTP socket timeout in milliseconds (int type)

<br />

Constant Value:

"httpSocketTimeout"


### MMS_CONFIG_MAX_IMAGE_HEIGHT

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

```
public static final String MMS_CONFIG_MAX_IMAGE_HEIGHT
```

Max MMS image height (int type)

<br />

Constant Value:

"maxImageHeight"


### MMS_CONFIG_MAX_IMAGE_WIDTH

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

```
public static final String MMS_CONFIG_MAX_IMAGE_WIDTH
```

Max MMS image width (int type)

<br />

Constant Value:

"maxImageWidth"


### MMS_CONFIG_MAX_MESSAGE_SIZE

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

```
public static final String MMS_CONFIG_MAX_MESSAGE_SIZE
```

Max MMS message size in bytes (int type)

<br />

Constant Value:

"maxMessageSize"


### MMS_CONFIG_MESSAGE_TEXT_MAX_SIZE

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

```
public static final String MMS_CONFIG_MESSAGE_TEXT_MAX_SIZE
```

Max message text size (int type)

<br />

Constant Value:

"maxMessageTextSize"


### MMS_CONFIG_MMS_DELIVERY_REPORT_ENABLED

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

```
public static final String MMS_CONFIG_MMS_DELIVERY_REPORT_ENABLED
```

Whether MMS delivery report is enabled (boolean type)

<br />

Constant Value:

"enableMMSDeliveryReports"


### MMS_CONFIG_MMS_ENABLED

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

```
public static final String MMS_CONFIG_MMS_ENABLED
```

Whether MMS is enabled for the current carrier (boolean type)

<br />

Constant Value:

"enabledMMS"


### MMS_CONFIG_MMS_READ_REPORT_ENABLED

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

```
public static final String MMS_CONFIG_MMS_READ_REPORT_ENABLED
```

Whether MMS read report is enabled (boolean type)

<br />

Constant Value:

"enableMMSReadReports"


### MMS_CONFIG_MULTIPART_SMS_ENABLED

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

```
public static final String MMS_CONFIG_MULTIPART_SMS_ENABLED
```

Whether multipart SMS is enabled (boolean type)

<br />

Constant Value:

"enableMultipartSMS"


### MMS_CONFIG_NAI_SUFFIX

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

```
public static final String MMS_CONFIG_NAI_SUFFIX
```

The suffix to append to the NAI header value for MMS HTTP request (String type)

<br />

Constant Value:

"naiSuffix"


### MMS_CONFIG_NOTIFY_WAP_MMSC_ENABLED

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

```
public static final String MMS_CONFIG_NOTIFY_WAP_MMSC_ENABLED
```

If this is enabled, M-NotifyResp.ind should be sent to the WAP Push content location instead
of the default MMSC (boolean type)

<br />

Constant Value:

"enabledNotifyWapMMSC"


### MMS_CONFIG_RECIPIENT_LIMIT

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

```
public static final String MMS_CONFIG_RECIPIENT_LIMIT
```

Limit of recipients of MMS messages (int type)

<br />

Constant Value:

"recipientLimit"


### MMS_CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES

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

```
public static final String MMS_CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES
```

Whether multipart SMS should be sent as separate messages

<br />

Constant Value:

"sendMultipartSmsAsSeparateMessages"


### MMS_CONFIG_SHOW_CELL_BROADCAST_APP_LINKS

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

```
public static final String MMS_CONFIG_SHOW_CELL_BROADCAST_APP_LINKS
```

If true, show the cell broadcast (amber alert) in the SMS settings. Some carriers don't want
this shown. (Boolean type)

<br />

Constant Value:

"config_cellBroadcastAppLinks"


### MMS_CONFIG_SMS_DELIVERY_REPORT_ENABLED

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

```
public static final String MMS_CONFIG_SMS_DELIVERY_REPORT_ENABLED
```

Whether SMS delivery report is enabled (boolean type)

<br />

Constant Value:

"enableSMSDeliveryReports"


### MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD

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

```
public static final String MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD
```

Some carriers require SMS to be converted into MMS when text length reaches this threshold
(int type)

<br />

Constant Value:

"smsToMmsTextLengthThreshold"


### MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD

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

```
public static final String MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD
```

When the number of parts of a multipart SMS reaches this threshold, it should be converted
into an MMS (int type)

<br />

Constant Value:

"smsToMmsTextThreshold"


### MMS_CONFIG_SUBJECT_MAX_LENGTH

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

```
public static final String MMS_CONFIG_SUBJECT_MAX_LENGTH
```

Max message subject length (int type)

<br />

Constant Value:

"maxSubjectLength"


### MMS_CONFIG_SUPPORT_HTTP_CHARSET_HEADER

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

```
public static final String MMS_CONFIG_SUPPORT_HTTP_CHARSET_HEADER
```

Whether the carrier MMSC supports charset field in Content-Type header. If this is false,
then we don't add "charset" to "Content-Type"

<br />

Constant Value:

"supportHttpCharsetHeader"


### MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION

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

```
public static final String MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION
```

Whether content-disposition field should be expected in an MMS PDU (boolean type)

<br />

Constant Value:

"supportMmsContentDisposition"


### MMS_CONFIG_UA_PROF_TAG_NAME

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

```
public static final String MMS_CONFIG_UA_PROF_TAG_NAME
```

The name of the UA Prof URL HTTP header for MMS HTTP request (String type)

<br />

Constant Value:

"uaProfTagName"


### MMS_CONFIG_UA_PROF_URL

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

```
public static final String MMS_CONFIG_UA_PROF_URL
```

The UA Profile URL header value for MMS HTTP request (String type)

<br />

Constant Value:

"uaProfUrl"


### MMS_CONFIG_USER_AGENT

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

```
public static final String MMS_CONFIG_USER_AGENT
```

The User-Agent header value for MMS HTTP request (String type)

<br />

Constant Value:

"userAgent"


### MMS_ERROR_CONFIGURATION_ERROR

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

```
public static final int MMS_ERROR_CONFIGURATION_ERROR
```

The carrier-dependent configuration values could not be loaded.

<br />

Constant Value:

7
(0x00000007)


### MMS_ERROR_DATA_DISABLED

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

```
public static final int MMS_ERROR_DATA_DISABLED
```

Data is disabled for the MMS APN.

<br />

Constant Value:

11
(0x0000000b)


### MMS_ERROR_HTTP_FAILURE

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

```
public static final int MMS_ERROR_HTTP_FAILURE
```

An error occurred during the HTTP client setup.

<br />

Constant Value:

4
(0x00000004)


### MMS_ERROR_INACTIVE_SUBSCRIPTION

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

```
public static final int MMS_ERROR_INACTIVE_SUBSCRIPTION
```

The subscription id for the send/download is inactive.

<br />

Constant Value:

10
(0x0000000a)


### MMS_ERROR_INVALID_APN

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

```
public static final int MMS_ERROR_INVALID_APN
```

ApnException occurred during MMS network setup.

<br />

Constant Value:

2
(0x00000002)


### MMS_ERROR_INVALID_SUBSCRIPTION_ID

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

```
public static final int MMS_ERROR_INVALID_SUBSCRIPTION_ID
```

The subscription id for the send/download is invalid.

<br />

Constant Value:

9
(0x00000009)


### MMS_ERROR_IO_ERROR

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

```
public static final int MMS_ERROR_IO_ERROR
```

An I/O error occurred reading the PDU.

<br />

Constant Value:

5
(0x00000005)


### MMS_ERROR_MMS_DISABLED_BY_CARRIER

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

```
public static final int MMS_ERROR_MMS_DISABLED_BY_CARRIER
```

MMS is disabled by a carrier.

<br />

Constant Value:

12
(0x0000000c)


### MMS_ERROR_NO_DATA_NETWORK

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

```
public static final int MMS_ERROR_NO_DATA_NETWORK
```

There is neither Wi-Fi nor mobile data network.

<br />

Constant Value:

8
(0x00000008)


### MMS_ERROR_RETRY

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

```
public static final int MMS_ERROR_RETRY
```

An error occurred while retrying sending/downloading the MMS.

<br />

Constant Value:

6
(0x00000006)


### MMS_ERROR_UNABLE_CONNECT_MMS

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

```
public static final int MMS_ERROR_UNABLE_CONNECT_MMS
```

An error occurred during the MMS connection setup.

<br />

Constant Value:

3
(0x00000003)


### MMS_ERROR_UNSPECIFIED

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

```
public static final int MMS_ERROR_UNSPECIFIED
```

Unspecific MMS error occurred during send/download.

<br />

Constant Value:

1
(0x00000001)


### RESULT_BLUETOOTH_DISCONNECTED

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

```
public static final int RESULT_BLUETOOTH_DISCONNECTED
```

Failed sending via bluetooth because bluetooth disconnected

<br />

Constant Value:

27
(0x0000001b)


### RESULT_CANCELLED

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

```
public static final int RESULT_CANCELLED
```

Failed because the operation was cancelled

<br />

Constant Value:

23
(0x00000017)


### RESULT_ENCODING_ERROR

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

```
public static final int RESULT_ENCODING_ERROR
```

Failed because of an encoding error

<br />

Constant Value:

18
(0x00000012)


### RESULT_ERROR_FDN_CHECK_FAILURE

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

```
public static final int RESULT_ERROR_FDN_CHECK_FAILURE
```

Failed because FDN is enabled.

<br />

Constant Value:

6
(0x00000006)


### RESULT_ERROR_GENERIC_FAILURE

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

```
public static final int RESULT_ERROR_GENERIC_FAILURE
```

Generic failure cause

<br />

Constant Value:

1
(0x00000001)


### RESULT_ERROR_LIMIT_EXCEEDED

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

```
public static final int RESULT_ERROR_LIMIT_EXCEEDED
```

Failed because we reached the sending queue limit.

<br />

Constant Value:

5
(0x00000005)


### RESULT_ERROR_NONE

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

```
public static final int RESULT_ERROR_NONE
```

No error.

<br />

Constant Value:

0
(0x00000000)


### RESULT_ERROR_NO_SERVICE

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

```
public static final int RESULT_ERROR_NO_SERVICE
```

Failed because service is currently unavailable

<br />

Constant Value:

4
(0x00000004)


### RESULT_ERROR_NULL_PDU

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

```
public static final int RESULT_ERROR_NULL_PDU
```

Failed because no pdu provided

<br />

Constant Value:

3
(0x00000003)


### RESULT_ERROR_RADIO_OFF

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

```
public static final int RESULT_ERROR_RADIO_OFF
```

Failed because radio was explicitly turned off

<br />

Constant Value:

2
(0x00000002)


### RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED

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

```
public static final int RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED
```

Failed because the user has denied this app ever send premium short codes.

<br />

Constant Value:

8
(0x00000008)


### RESULT_ERROR_SHORT_CODE_NOT_ALLOWED

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

```
public static final int RESULT_ERROR_SHORT_CODE_NOT_ALLOWED
```

Failed because user denied the sending of this short code.

<br />

Constant Value:

7
(0x00000007)


### RESULT_INTERNAL_ERROR

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

```
public static final int RESULT_INTERNAL_ERROR
```

Failed because of an internal error

<br />

Constant Value:

21
(0x00000015)


### RESULT_INVALID_ARGUMENTS

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

```
public static final int RESULT_INVALID_ARGUMENTS
```

Failed because of invalid arguments

<br />

Constant Value:

11
(0x0000000b)


### RESULT_INVALID_BLUETOOTH_ADDRESS

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

```
public static final int RESULT_INVALID_BLUETOOTH_ADDRESS
```

Failed sending via bluetooth because the bluetooth device address is invalid

<br />

Constant Value:

26
(0x0000001a)


### RESULT_INVALID_SMSC_ADDRESS

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

```
public static final int RESULT_INVALID_SMSC_ADDRESS
```

Failed because of an invalid smsc address

<br />

Constant Value:

19
(0x00000013)


### RESULT_INVALID_SMS_FORMAT

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

```
public static final int RESULT_INVALID_SMS_FORMAT
```

Failed because the sms format is not valid

<br />

Constant Value:

14
(0x0000000e)


### RESULT_INVALID_STATE

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

```
public static final int RESULT_INVALID_STATE
```

Failed because of an invalid state

<br />

Constant Value:

12
(0x0000000c)


### RESULT_MODEM_ERROR

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

```
public static final int RESULT_MODEM_ERROR
```

Failed because of a modem error

<br />

Constant Value:

16
(0x00000010)


### RESULT_NETWORK_ERROR

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

```
public static final int RESULT_NETWORK_ERROR
```

Failed because of a network error

<br />

Constant Value:

17
(0x00000011)


### RESULT_NETWORK_REJECT

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

```
public static final int RESULT_NETWORK_REJECT
```

Failed because of network rejection

<br />

Constant Value:

10
(0x0000000a)


### RESULT_NO_BLUETOOTH_SERVICE

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

```
public static final int RESULT_NO_BLUETOOTH_SERVICE
```

Failed sending via bluetooth because the bluetooth service is not available

<br />

Constant Value:

25
(0x00000019)


### RESULT_NO_DEFAULT_SMS_APP

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

```
public static final int RESULT_NO_DEFAULT_SMS_APP
```

Set by BroadcastReceiver to indicate there's no default sms app.

<br />

Constant Value:

32
(0x00000020)


### RESULT_NO_MEMORY

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

```
public static final int RESULT_NO_MEMORY
```

Failed because there is no memory

<br />

Constant Value:

13
(0x0000000d)


### RESULT_NO_RESOURCES

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

```
public static final int RESULT_NO_RESOURCES
```

Failed because there are no resources

<br />

Constant Value:

22
(0x00000016)


### RESULT_OPERATION_NOT_ALLOWED

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

```
public static final int RESULT_OPERATION_NOT_ALLOWED
```

Failed because the operation is not allowed

<br />

Constant Value:

20
(0x00000014)


### RESULT_RADIO_NOT_AVAILABLE

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

```
public static final int RESULT_RADIO_NOT_AVAILABLE
```

Failed because the radio was not available

<br />

Constant Value:

9
(0x00000009)


### RESULT_RECEIVE_DISPATCH_FAILURE

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

```
public static final int RESULT_RECEIVE_DISPATCH_FAILURE
```

SMS receive dispatch failure.

<br />

Constant Value:

500
(0x000001f4)


### RESULT_RECEIVE_INJECTED_NULL_PDU

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

```
public static final int RESULT_RECEIVE_INJECTED_NULL_PDU
```

SMS receive injected null PDU.

<br />

Constant Value:

501
(0x000001f5)


### RESULT_RECEIVE_NULL_MESSAGE_FROM_RIL

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

```
public static final int RESULT_RECEIVE_NULL_MESSAGE_FROM_RIL
```

SMS received null message from the radio interface layer.

<br />

Constant Value:

503
(0x000001f7)


### RESULT_RECEIVE_RUNTIME_EXCEPTION

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

```
public static final int RESULT_RECEIVE_RUNTIME_EXCEPTION
```

SMS receive encountered runtime exception.

<br />

Constant Value:

502
(0x000001f6)


### RESULT_RECEIVE_SQL_EXCEPTION

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

```
public static final int RESULT_RECEIVE_SQL_EXCEPTION
```

SMS receive encountered an SQL exception.

<br />

Constant Value:

505
(0x000001f9)


### RESULT_RECEIVE_URI_EXCEPTION

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

```
public static final int RESULT_RECEIVE_URI_EXCEPTION
```

SMS receive an exception parsing a uri.

<br />

Constant Value:

506
(0x000001fa)


### RESULT_RECEIVE_WHILE_ENCRYPTED

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

```
public static final int RESULT_RECEIVE_WHILE_ENCRYPTED
```

SMS short code received while the phone is in encrypted state.

<br />

Constant Value:

504
(0x000001f8)


### RESULT_REMOTE_EXCEPTION

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

```
public static final int RESULT_REMOTE_EXCEPTION
```

Set by BroadcastReceiver to indicate a remote exception while handling a message.

<br />

Constant Value:

31
(0x0000001f)


### RESULT_REQUEST_NOT_SUPPORTED

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

```
public static final int RESULT_REQUEST_NOT_SUPPORTED
```

Failed because the request is not supported

<br />

Constant Value:

24
(0x00000018)


### RESULT_RIL_ABORTED

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

```
public static final int RESULT_RIL_ABORTED
```

Operation aborted

<br />

Constant Value:

137
(0x00000089)


### RESULT_RIL_ACCESS_BARRED

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

```
public static final int RESULT_RIL_ACCESS_BARRED
```

Access is barred.

<br />

Constant Value:

122
(0x0000007a)


### RESULT_RIL_BLOCKED_DUE_TO_CALL

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

```
public static final int RESULT_RIL_BLOCKED_DUE_TO_CALL
```

SMS is blocked due to call control, e.g., resource unavailable in the SMR entity.

<br />

Constant Value:

123
(0x0000007b)


### RESULT_RIL_CANCELLED

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

```
public static final int RESULT_RIL_CANCELLED
```

The request has been cancelled.

<br />

Constant Value:

119
(0x00000077)


### RESULT_RIL_DEVICE_IN_USE

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

```
public static final int RESULT_RIL_DEVICE_IN_USE
```

Operation cannot be performed because the device is currently in use

<br />

Constant Value:

136
(0x00000088)


### RESULT_RIL_ENCODING_ERR

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

```
public static final int RESULT_RIL_ENCODING_ERR
```

The SMS message was not encoded properly.

<br />

Constant Value:

109
(0x0000006d)


### RESULT_RIL_GENERIC_ERROR

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

```
public static final int RESULT_RIL_GENERIC_ERROR
```

A RIL error occurred during the SMS send.

<br />

Constant Value:

124
(0x0000007c)


### RESULT_RIL_INTERNAL_ERR

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

```
public static final int RESULT_RIL_INTERNAL_ERR
```

The modem encountered an unexpected error scenario while handling the request.

<br />

Constant Value:

113
(0x00000071)


### RESULT_RIL_INVALID_ARGUMENTS

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

```
public static final int RESULT_RIL_INVALID_ARGUMENTS
```

The radio received invalid arguments in the request.

<br />

Constant Value:

104
(0x00000068)


### RESULT_RIL_INVALID_MODEM_STATE

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

```
public static final int RESULT_RIL_INVALID_MODEM_STATE
```

The radio cannot process the request in the current modem state.

<br />

Constant Value:

115
(0x00000073)


### RESULT_RIL_INVALID_RESPONSE

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

```
public static final int RESULT_RIL_INVALID_RESPONSE
```

A RIL internal error when one of the RIL layers receives an unrecognized response from a
lower layer.

<br />

Constant Value:

125
(0x0000007d)


### RESULT_RIL_INVALID_SIM_STATE

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

```
public static final int RESULT_RIL_INVALID_SIM_STATE
```

Cannot process the request in current SIM state

<br />

Constant Value:

130
(0x00000082)


### RESULT_RIL_INVALID_SMSC_ADDRESS

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

```
public static final int RESULT_RIL_INVALID_SMSC_ADDRESS
```

The specified SMSC address was invalid.

<br />

Constant Value:

110
(0x0000006e)


### RESULT_RIL_INVALID_SMS_FORMAT

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

```
public static final int RESULT_RIL_INVALID_SMS_FORMAT
```

The radio returned an error indicating invalid sms format.

<br />

Constant Value:

107
(0x0000006b)


### RESULT_RIL_INVALID_STATE

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

```
public static final int RESULT_RIL_INVALID_STATE
```

The radio returned an unexpected request for the current state.

<br />

Constant Value:

103
(0x00000067)


### RESULT_RIL_MODEM_ERR

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

```
public static final int RESULT_RIL_MODEM_ERR
```

The vendor RIL received an unexpected or incorrect response.

<br />

Constant Value:

111
(0x0000006f)


### RESULT_RIL_NETWORK_ERR

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

```
public static final int RESULT_RIL_NETWORK_ERR
```

The radio received an error from the network.

<br />

Constant Value:

112
(0x00000070)


### RESULT_RIL_NETWORK_NOT_READY

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

```
public static final int RESULT_RIL_NETWORK_NOT_READY
```

The network is not ready to perform the request.

<br />

Constant Value:

116
(0x00000074)


### RESULT_RIL_NETWORK_REJECT

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

```
public static final int RESULT_RIL_NETWORK_REJECT
```

The sms request was rejected by the network.

<br />

Constant Value:

102
(0x00000066)


### RESULT_RIL_NO_MEMORY

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

```
public static final int RESULT_RIL_NO_MEMORY
```

The radio didn't have sufficient memory to process the request.

<br />

Constant Value:

105
(0x00000069)


### RESULT_RIL_NO_NETWORK_FOUND

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

```
public static final int RESULT_RIL_NO_NETWORK_FOUND
```

Network cannot be found

<br />

Constant Value:

135
(0x00000087)


### RESULT_RIL_NO_RESOURCES

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

```
public static final int RESULT_RIL_NO_RESOURCES
```

There are insufficient resources to process the request.

<br />

Constant Value:

118
(0x00000076)


### RESULT_RIL_NO_SMS_TO_ACK

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

```
public static final int RESULT_RIL_NO_SMS_TO_ACK
```

ACK received when there is no SMS to ack

<br />

Constant Value:

131
(0x00000083)


### RESULT_RIL_NO_SUBSCRIPTION

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

```
public static final int RESULT_RIL_NO_SUBSCRIPTION
```

Device does not have subscription

<br />

Constant Value:

134
(0x00000086)


### RESULT_RIL_OPERATION_NOT_ALLOWED

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

```
public static final int RESULT_RIL_OPERATION_NOT_ALLOWED
```

The radio reports the request is not allowed.

<br />

Constant Value:

117
(0x00000075)


### RESULT_RIL_RADIO_NOT_AVAILABLE

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

```
public static final int RESULT_RIL_RADIO_NOT_AVAILABLE
```

The radio did not start or is resetting.

<br />

Constant Value:

100
(0x00000064)


### RESULT_RIL_REQUEST_NOT_SUPPORTED

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

```
public static final int RESULT_RIL_REQUEST_NOT_SUPPORTED
```

The request was not supported by the radio.

<br />

Constant Value:

114
(0x00000072)


### RESULT_RIL_REQUEST_RATE_LIMITED

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

```
public static final int RESULT_RIL_REQUEST_RATE_LIMITED
```

The radio denied the operation due to overly-frequent requests.

<br />

Constant Value:

106
(0x0000006a)


### RESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED

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

```
public static final int RESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED
```

1X voice and SMS are not allowed simultaneously.

<br />

Constant Value:

121
(0x00000079)


### RESULT_RIL_SIM_ABSENT

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

```
public static final int RESULT_RIL_SIM_ABSENT
```

The radio failed to set the location where the CDMA subscription
can be retrieved because the SIM or RUIM is absent.

<br />

Constant Value:

120
(0x00000078)


### RESULT_RIL_SIM_BUSY

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

```
public static final int RESULT_RIL_SIM_BUSY
```

SIM is busy

<br />

Constant Value:

132
(0x00000084)


### RESULT_RIL_SIM_ERROR

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

```
public static final int RESULT_RIL_SIM_ERROR
```

Received error from SIM card

<br />

Constant Value:

129
(0x00000081)


### RESULT_RIL_SIM_FULL

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

```
public static final int RESULT_RIL_SIM_FULL
```

The target EF is full

<br />

Constant Value:

133
(0x00000085)


### RESULT_RIL_SIM_PIN2

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

```
public static final int RESULT_RIL_SIM_PIN2
```

Operation requires SIM PIN2 to be entered

<br />

Constant Value:

126
(0x0000007e)


### RESULT_RIL_SIM_PUK2

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

```
public static final int RESULT_RIL_SIM_PUK2
```

Operation requires SIM PUK2 to be entered

<br />

Constant Value:

127
(0x0000007f)


### RESULT_RIL_SMS_SEND_FAIL_RETRY

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

```
public static final int RESULT_RIL_SMS_SEND_FAIL_RETRY
```

The radio failed to send the sms and needs to retry.

<br />

Constant Value:

101
(0x00000065)


### RESULT_RIL_SUBSCRIPTION_NOT_AVAILABLE

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

```
public static final int RESULT_RIL_SUBSCRIPTION_NOT_AVAILABLE
```

Fail to find CDMA subscription from specified location

<br />

Constant Value:

128
(0x00000080)


### RESULT_RIL_SYSTEM_ERR

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

```
public static final int RESULT_RIL_SYSTEM_ERR
```

The radio encountered a platform or system error.

<br />

Constant Value:

108
(0x0000006c)


### RESULT_SMS_BLOCKED_DURING_EMERGENCY

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

```
public static final int RESULT_SMS_BLOCKED_DURING_EMERGENCY
```

Failed sending during an emergency call

<br />

Constant Value:

29
(0x0000001d)


### RESULT_SMS_SEND_FAILED_AFTER_MAX_RETRY

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

```
public static final int RESULT_SMS_SEND_FAILED_AFTER_MAX_RETRY
```

Indicates that the SMS sending operation failed because all allowed retry attempts
were exhausted without successfully sending the message.


This is distinct from `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_SMS_SEND_RETRY_FAILED`, which signals a single failed
retry attempt where further retries might still be scheduled.
In contrast, `RESULT_SMS_SEND_FAILED_AFTER_MAX_RETRY` signifies that the maximum retry
limit has been surpassed, and no more attempts will be made for this SMS message.

<br />

Constant Value:

138
(0x0000008a)


### RESULT_SMS_SEND_RETRY_FAILED

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

```
public static final int RESULT_SMS_SEND_RETRY_FAILED
```

Failed to send an sms retry

<br />

Constant Value:

30
(0x0000001e)


### RESULT_SYSTEM_ERROR

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

```
public static final int RESULT_SYSTEM_ERROR
```

Failed because of a system error

<br />

Constant Value:

15
(0x0000000f)


### RESULT_UNEXPECTED_EVENT_STOP_SENDING

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

```
public static final int RESULT_UNEXPECTED_EVENT_STOP_SENDING
```

Failed sending because the user denied or canceled the dialog displayed for a premium
shortcode sms or rate-limited sms.

<br />

Constant Value:

28
(0x0000001c)


### RESULT_USER_NOT_ALLOWED

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

```
public static final int RESULT_USER_NOT_ALLOWED
```

User is not associated with the subscription.

<br />

Constant Value:

33
(0x00000021)


### SMS_RP_CAUSE_CALL_BARRING

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

```
public static final int SMS_RP_CAUSE_CALL_BARRING
```

RP-Cause Value for Call Barring

<br />

Constant Value:

10
(0x0000000a)


### SMS_RP_CAUSE_CONGESTION

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

```
public static final int SMS_RP_CAUSE_CONGESTION
```

RP-Cause Value for SMS Failure due to Congestion in network

<br />

Constant Value:

42
(0x0000002a)


### SMS_RP_CAUSE_DESTINATION_OUT_OF_ORDER

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

```
public static final int SMS_RP_CAUSE_DESTINATION_OUT_OF_ORDER
```

RP-Cause Value for Destination is Out of Order

<br />

Constant Value:

27
(0x0000001b)


### SMS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED

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

```
public static final int SMS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED
```

RP-Cause Value when network does not provide the received service

<br />

Constant Value:

69
(0x00000045)


### SMS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED

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

```
public static final int SMS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED
```

RP-Cause Value when SMS Facilty is not subscribed by Reote device

<br />

Constant Value:

50
(0x00000032)


### SMS_RP_CAUSE_FACILITY_REJECTED

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

```
public static final int SMS_RP_CAUSE_FACILITY_REJECTED
```

RP-Cause Value when SMS Facility if Rejected by Operator

<br />

Constant Value:

29
(0x0000001d)


### SMS_RP_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT

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

```
public static final int SMS_RP_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT
```

RP-Cause Value when network does not provide the received service

<br />

Constant Value:

99
(0x00000063)


### SMS_RP_CAUSE_INTERWORKING_UNSPECIFIED

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

```
public static final int SMS_RP_CAUSE_INTERWORKING_UNSPECIFIED
```

RP-Cause Value when network does not provide the received service

<br />

Constant Value:

127
(0x0000007f)


### SMS_RP_CAUSE_INVALID_MANDATORY_INFORMATION

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

```
public static final int SMS_RP_CAUSE_INVALID_MANDATORY_INFORMATION
```

RP-Cause Value when network does not provide the received service

<br />

Constant Value:

96
(0x00000060)


### SMS_RP_CAUSE_INVALID_MESSAGE_REFERENCE_VALUE

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

```
public static final int SMS_RP_CAUSE_INVALID_MESSAGE_REFERENCE_VALUE
```

RP-Cause Value when RP-MessageRefere

<br />

Constant Value:

81
(0x00000051)


### SMS_RP_CAUSE_MESSAGE_INCOMPATIBLE_WITH_PROTOCOL_STATE

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

```
public static final int SMS_RP_CAUSE_MESSAGE_INCOMPATIBLE_WITH_PROTOCOL_STATE
```

RP-Cause Value when network does not provide the received service

<br />

Constant Value:

98
(0x00000062)


### SMS_RP_CAUSE_MESSAGE_TYPE_NON_EXISTENT

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

```
public static final int SMS_RP_CAUSE_MESSAGE_TYPE_NON_EXISTENT
```

RP-Cause Value when network does not provide the received service

<br />

Constant Value:

97
(0x00000061)


### SMS_RP_CAUSE_NETWORK_OUT_OF_ORDER

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

```
public static final int SMS_RP_CAUSE_NETWORK_OUT_OF_ORDER
```

RP-Cause Value when network is out of order

<br />

Constant Value:

38
(0x00000026)


### SMS_RP_CAUSE_OPERATOR_DETERMINED_BARRING

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

```
public static final int SMS_RP_CAUSE_OPERATOR_DETERMINED_BARRING
```

RP-Cause for Operator Barring

<br />

Constant Value:

8
(0x00000008)


### SMS_RP_CAUSE_PROTOCOL_ERROR

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

```
public static final int SMS_RP_CAUSE_PROTOCOL_ERROR
```

RP-Cause Value when network does not provide the received service

<br />

Constant Value:

111
(0x0000006f)


### SMS_RP_CAUSE_RESERVED

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

```
public static final int SMS_RP_CAUSE_RESERVED
```

RP-Cause value for Reserved Number

<br />

Constant Value:

11
(0x0000000b)


### SMS_RP_CAUSE_RESOURCES_UNAVAILABLE

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

```
public static final int SMS_RP_CAUSE_RESOURCES_UNAVAILABLE
```

RP-Cause Value when Network Resources are unavailable

<br />

Constant Value:

47
(0x0000002f)


### SMS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE

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

```
public static final int SMS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE
```

RP-Cause Value when network does not provide the received service

<br />

Constant Value:

95
(0x0000005f)


### SMS_RP_CAUSE_SHORT_MESSAGE_TRANSFER_REJECTED

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

```
public static final int SMS_RP_CAUSE_SHORT_MESSAGE_TRANSFER_REJECTED
```

RP-Cause Value for Message Transfer Rejected by Network

<br />

Constant Value:

21
(0x00000015)


### SMS_RP_CAUSE_TEMPORARY_FAILURE

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

```
public static final int SMS_RP_CAUSE_TEMPORARY_FAILURE
```

RP-Cause Value For Temporary failure

<br />

Constant Value:

41
(0x00000029)


### SMS_RP_CAUSE_UNALLOCATED_NUMBER

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

```
public static final int SMS_RP_CAUSE_UNALLOCATED_NUMBER
```

Unallocated Number Cause

<br />

Constant Value:

1
(0x00000001)


### SMS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER

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

```
public static final int SMS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER
```

RP-Cause Value when Subscriber is not Identified

<br />

Constant Value:

28
(0x0000001c)


### SMS_RP_CAUSE_UNKNOWN_SUBSCRIBER

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

```
public static final int SMS_RP_CAUSE_UNKNOWN_SUBSCRIBER
```

RP-Cause Value when Subscriber is not Identified

<br />

Constant Value:

30
(0x0000001e)


### STATUS_ON_ICC_FREE

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

```
public static final int STATUS_ON_ICC_FREE
```

Free space (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).

<br />

Constant Value:

0
(0x00000000)


### STATUS_ON_ICC_READ

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

```
public static final int STATUS_ON_ICC_READ
```

Received and read (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).

<br />

Constant Value:

1
(0x00000001)


### STATUS_ON_ICC_SENT

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

```
public static final int STATUS_ON_ICC_SENT
```

Stored and sent (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).

<br />

Constant Value:

5
(0x00000005)


### STATUS_ON_ICC_UNREAD

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

```
public static final int STATUS_ON_ICC_UNREAD
```

Received and unread (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).

<br />

Constant Value:

3
(0x00000003)


### STATUS_ON_ICC_UNSENT

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

```
public static final int STATUS_ON_ICC_UNSENT
```

Stored and unsent (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).

<br />

Constant Value:

7
(0x00000007)


## Public methods

### createAppSpecificSmsToken

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

```
public String createAppSpecificSmsToken (PendingIntent intent)
```

Create a single use app specific incoming SMS request for the calling package.

This method returns a token that if included in a subsequent incoming SMS message will cause
`intent` to be sent with the SMS data.

The token is only good for one use, after an SMS has been received containing the token all
subsequent SMS messages with the token will be routed as normal.

An app can only have one request at a time, if the app already has a request pending it will
be replaced with a new request.

**Note:** This method will never trigger an SMS disambiguation
dialog. If this method is called on a device that has multiple active subscriptions, this
`https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined
default subscription is defined, the subscription ID associated with this message will be
INVALID, which will result in the operation being completed on the subscription associated
with logical slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the
operation is performed on the correct subscription.
.   
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 />

<br />

| Parameters ||
|---|---|
| `intent` | `PendingIntent` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | Token to include in an SMS message. The token will be 11 characters long. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException` | If the intent is null. |
| `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`. |

**See also:**

- `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#getMessagesFromIntent(android.content.Intent)`

### createAppSpecificSmsTokenWithPackageInfo

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

```
public String createAppSpecificSmsTokenWithPackageInfo (String prefixes, 
                PendingIntent intent)
```

Create a single use app specific incoming SMS request for the calling package.

This method returns a token that if included in a subsequent incoming SMS message, and the
SMS message has a prefix from the given prefixes list, the provided `intent` will be
sent with the SMS data to the calling package.

The token is only good for one use within a reasonable amount of time. After an SMS has been
received containing the token all subsequent SMS messages with the token will be routed as
normal.

An app can only have one request at a time, if the app already has a request pending it will
be replaced with a new request.

**Note:** This method will never trigger an SMS disambiguation
dialog. If this method is called on a device that has multiple active subscriptions, this
`https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined
default subscription is defined, the subscription ID associated with this message will be
INVALID, which will result in the operation being completed on the subscription associated
with logical slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the
operation is performed on the correct subscription.
.   
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 />

<br />

| Parameters ||
|---|---|
| `prefixes` | `String`: this is a list of prefixes string separated by REGEX_PREFIX_DELIMITER. The matching SMS message should have at least one of the prefixes in the beginning of the message. This value may be `null`. <br /> |
| `intent` | `PendingIntent`: this intent is sent when the matching SMS message is received. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | Token to include in an SMS message. 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_MESSAGING`. |

### createForSubscriptionId

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

```
public SmsManager createForSubscriptionId (int subId)
```

Get the instance of the SmsManager associated with a particular subscription ID.

**Note:** Constructing an `https://developer.android.com/reference/android/telephony/SmsManager` in this manner will
never cause an SMS disambiguation dialog to appear, unlike `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`.
.   
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 />

<br />

| Parameters ||
|---|---|
| `subId` | `int`: an SMS subscription ID, typically accessed using `https://developer.android.com/reference/android/telephony/SubscriptionManager` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SmsManager` | the instance of the SmsManager associated with subscription. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionManager#getActiveSubscriptionInfoList()`
- `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSmsSubscriptionId()`

### divideMessage

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

```
public ArrayList<String> divideMessage (String text)
```

Divide a message text into several fragments, none bigger than the maximum SMS message size.


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

| Parameters ||
|---|---|
| `text` | `String`: the original message. Must not be null. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/String>` | an `ArrayList` of strings that, in order, comprise the original message. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if text is null. |

### downloadMultimediaMessage

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

```
public void downloadMultimediaMessage (Context context, 
                String locationUrl, 
                Uri contentUri, 
                Bundle configOverrides, 
                PendingIntent downloadedIntent)
```

Download an MMS message from carrier by a given location URL

**Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this
manager on a multi-SIM device, this operation may fail downloading the MMS message because no
suitable default subscription could be found. In this case, if `downloadedIntent` is
non-null, then the `https://developer.android.com/reference/android/app/PendingIntent` will be sent with an error code
`RESULT_NO_DEFAULT_SMS_APP`. See `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` for more information on the
conditions where this operation may fail.
.   
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 />

<br />

| Parameters ||
|---|---|
| `context` | `Context`: application context <br /> |
| `locationUrl` | `String`: the location URL of the MMS message to be downloaded, usually obtained from the MMS WAP push notification <br /> |
| `contentUri` | `Uri`: the content uri to which the downloaded pdu will be written <br /> |
| `configOverrides` | `Bundle`: the carrier-specific messaging configuration values to override for downloading the message. <br /> |
| `downloadedIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is downloaded, or the download is failed The result code will be `Activity.RESULT_OK` for success or one of these errors: `MMS_ERROR_UNSPECIFIED` `MMS_ERROR_INVALID_APN` `MMS_ERROR_UNABLE_CONNECT_MMS` `MMS_ERROR_HTTP_FAILURE` `MMS_ERROR_IO_ERROR` `MMS_ERROR_RETRY` `MMS_ERROR_CONFIGURATION_ERROR` `MMS_ERROR_NO_DATA_NETWORK` `MMS_ERROR_INVALID_SUBSCRIPTION_ID` `MMS_ERROR_INACTIVE_SUBSCRIPTION` `MMS_ERROR_DATA_DISABLED` `MMS_ERROR_MMS_DISABLED_BY_CARRIER` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if locationUrl or contentUri is empty |
| `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`. |

### downloadMultimediaMessage

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

```
public void downloadMultimediaMessage (Context context, 
                String locationUrl, 
                Uri contentUri, 
                Bundle configOverrides, 
                PendingIntent downloadedIntent, 
                long messageId)
```

Download an MMS message from carrier by a given location URL

Same as `https://developer.android.com/reference/android/telephony/SmsManager#downloadMultimediaMessage(android.content.Context,%20java.lang.String,%20android.net.Uri,%20android.os.Bundle,%20android.app.PendingIntent)`,
but adds an optional messageId.

**Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this
manager on a multi-SIM device, this operation may fail downloading the MMS message because no
suitable default subscription could be found. In this case, if `downloadedIntent` is
non-null, then the `https://developer.android.com/reference/android/app/PendingIntent` will be sent with an error code
`RESULT_NO_DEFAULT_SMS_APP`. See `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` for more information on the
conditions where this operation may fail.
.   
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 />

<br />

| Parameters ||
|---|---|
| `context` | `Context`: application context. This value cannot be `null`. <br /> |
| `locationUrl` | `String`: the location URL of the MMS message to be downloaded, usually obtained from the MMS WAP push notification. This value cannot be `null`. <br /> |
| `contentUri` | `Uri`: the content uri to which the downloaded pdu will be written. This value cannot be `null`. <br /> |
| `configOverrides` | `Bundle`: the carrier-specific messaging configuration values to override for downloading the message. This value may be `null`. <br /> |
| `downloadedIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is downloaded, or the download is failed The result code will be `Activity.RESULT_OK` for success or one of these errors: `MMS_ERROR_UNSPECIFIED` `MMS_ERROR_INVALID_APN` `MMS_ERROR_UNABLE_CONNECT_MMS` `MMS_ERROR_HTTP_FAILURE` `MMS_ERROR_IO_ERROR` `MMS_ERROR_RETRY` `MMS_ERROR_CONFIGURATION_ERROR` `MMS_ERROR_NO_DATA_NETWORK` `MMS_ERROR_INVALID_SUBSCRIPTION_ID` `MMS_ERROR_INACTIVE_SUBSCRIPTION` `MMS_ERROR_DATA_DISABLED` `MMS_ERROR_MMS_DISABLED_BY_CARRIER` . This value may be `null`. <br /> |
| `messageId` | `long`: an id that uniquely identifies the message requested to be downloaded. Used for logging and diagnostics purposes. The id may be 0. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if locationUrl or contentUri is empty |
| `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`. |

### getCarrierConfigValues

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

```
public Bundle getCarrierConfigValues ()
```

Get carrier-dependent MMS configuration values.

**Note:** This method is intended for internal use by carrier
applications or the Telephony framework and will never trigger an SMS disambiguation dialog.
If this method is called on a device that has multiple active subscriptions, this `https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined default
subscription is defined, the subscription ID associated with this message will be INVALID,
which will result in the operation being completed on the subscription associated with
logical slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the operation is
performed on the correct subscription.
.   
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 />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | the bundle key/values pairs that contains MMS configuration values or an empty Bundle if they cannot be found. 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_MESSAGING`. |

### getDefault

Added in [API level 4](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 static SmsManager getDefault ()
```


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

Use `https://developer.android.com/reference/android/content/Context#getSystemService(java.lang.Class<T>)`
instead

Get the SmsManager associated with the default subscription id. The instance will always be
associated with the default subscription id, even if the default subscription id changes.

**Note:** For devices that support multiple active subscriptions
at a time, SmsManager will track the subscription set by the user as the default SMS
subscription. If the user has not set a default, `https://developer.android.com/reference/android/telephony/SmsManager` may
start an activity to kick off a subscription disambiguation dialog. Most operations will not
complete until the user has chosen the subscription that will be associated with the
operation. If the user cancels the dialog without choosing a subscription, one of the
following will happen, depending on the target SDK version of the application. For
compatibility purposes, if the target SDK level is \<= 28, telephony will still send the SMS
over the first available subscription. If the target SDK level is \> 28, the operation will
fail to complete.

**Note:** If this method is used to perform an operation on a
device that has multiple active subscriptions, the user has not set a default SMS
subscription, and the operation is being performed while the application is not in the
foreground, the SMS disambiguation dialog will not be shown. The result of the operation will
conclude as if the user cancelled the disambiguation dialog and the operation will finish as
outlined above, depending on the target SDK version of the calling application. It is safer
to use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` if the application will perform the
operation while in the background because this can cause unpredictable results, such as the
operation being sent over the wrong subscription or failing completely, depending on the
user's default SMS subscription setting.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SmsManager` | the `https://developer.android.com/reference/android/telephony/SmsManager` associated with the default subscription id. <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSmsSubscriptionId()`

### getDefaultSmsSubscriptionId

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

```
public static int getDefaultSmsSubscriptionId ()
```

Get default sms subscription id.

**Note:** This returns a value different from
`https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSmsSubscriptionId()` if the user has not chosen a default.
In this case it returns the active subscription id if there's only one active subscription
available.


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 ||
|---|---|
| `int` | the user-defined default SMS subscription id, or the active subscription id if there's only one active subscription available, otherwise `https://developer.android.com/reference/android/telephony/SubscriptionManager#INVALID_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_MESSAGING`. |

### getSmsCapacityOnIcc

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

```
public int getSmsCapacityOnIcc ()
```

Gets the total capacity of SMS storage on the SIM card.


This is the number of 176 byte EF-SMS records which can be stored on the SIM card.
See 3GPP TS 31.102 - 4.2.25 - EF-SMS for more information.

**Note:** This method will never trigger an SMS disambiguation
dialog. If this method is called on a device that has multiple active subscriptions, this
`https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined
default subscription is defined, the subscription ID associated with this method will be
INVALID, which will result in the operation being completed on the subscription associated
with logical slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the operation
is performed on the correct subscription.
.   
Requires `https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE` or android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE.   
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 />

<br />

| Returns ||
|---|---|
| `int` | the total number of SMS records which can be stored on the SIM card. Value is 0 or greater <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`. |

### getSmsManagerForSubscriptionId

Added in [API level 22](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 static SmsManager getSmsManagerForSubscriptionId (int subId)
```


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

Use `https://developer.android.com/reference/android/content/Context#getSystemService(java.lang.Class<T>)`
.`https://developer.android.com/reference/android/telephony/SmsManager#createForSubscriptionId(int)` instead

Get the instance of the SmsManager associated with a particular subscription ID.

**Note:** Constructing an `https://developer.android.com/reference/android/telephony/SmsManager` in this manner will
never cause an SMS disambiguation dialog to appear, unlike `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`.
.   
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 />

<br />

| Parameters ||
|---|---|
| `subId` | `int`: an SMS subscription ID, typically accessed using `https://developer.android.com/reference/android/telephony/SubscriptionManager` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SmsManager` | the instance of the SmsManager associated with subscription <br /> |

**See also:**

- `https://developer.android.com/reference/android/telephony/SubscriptionManager#getActiveSubscriptionInfoList()`
- `https://developer.android.com/reference/android/telephony/SubscriptionManager#getDefaultSmsSubscriptionId()`

### getSmsMessagesForFinancialApp

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

```
public void getSmsMessagesForFinancialApp (Bundle params, 
                Executor executor, 
                SmsManager.FinancialSmsCallback callback)
```

Get SMS messages for the calling financial app.
The result will be delivered asynchronously in the passing in callback interface.

**Note:** This method will never trigger an SMS disambiguation
dialog. If this method is called on a device that has multiple active subscriptions, this
`https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined
default subscription is defined, the subscription ID associated with this message will be
INVALID, which will result in the operation being completed on the subscription associated
with logical slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the
operation is performed on the correct subscription.
.   
Requires `https://developer.android.com/reference/android/Manifest.permission#SMS_FINANCIAL_TRANSACTIONS`

<br />

<br />

| Parameters ||
|---|---|
| `params` | `Bundle`: the parameters to filter SMS messages returned. <br /> |
| `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` | `SmsManager.FinancialSmsCallback`: a callback to receive CursorWindow with SMS messages. This value cannot be `null`. <br /> |

### getSmscAddress

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

```
public String getSmscAddress ()
```

Gets the SMSC address from (U)SIM.

**Note:** Using this method requires that your app is the
default SMS application, or READ_PRIVILEGED_PHONE_STATE permission, or has the carrier
privileges.

**Note:** This method will never trigger an SMS disambiguation
dialog. If this method is called on a device that has multiple active subscriptions, this
`https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined
default subscription is defined, the subscription ID associated with this method will be
INVALID, which will result in the operation being completed on the subscription associated
with logical slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the operation
is performed on the correct subscription.
.   
Requires android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE.   
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 />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the SMSC address string, null if failed. <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`. |

### getSubscriptionId

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

```
public int getSubscriptionId ()
```

Get the associated subscription id. If the instance was returned by `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`,
then this method may return different values at different points in time (if the user
changes the default subscription id).

**Note:** This method used to display a disambiguation dialog to
the user asking them to choose a default subscription to send SMS messages over if they
haven't chosen yet. Starting in API level 29, we allow the user to not have a default set as
a valid option for the default SMS subscription on multi-SIM devices. We no longer show the
disambiguation dialog and return `https://developer.android.com/reference/android/telephony/SubscriptionManager#INVALID_SUBSCRIPTION_ID` if the
device has multiple active subscriptions and no default is set.
.   
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 />

<br />

| Returns ||
|---|---|
| `int` | associated subscription ID or `https://developer.android.com/reference/android/telephony/SubscriptionManager#INVALID_SUBSCRIPTION_ID` if the default subscription id cannot be determined or the device has multiple active subscriptions and and no default is set ("ask every time") by the user. <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`. |

### injectSmsPdu

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

```
public void injectSmsPdu (byte[] pdu, 
                String format, 
                PendingIntent receivedIntent)
```

Inject an SMS PDU into the android application framework.

Requires permission: `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` or carrier
privileges per `https://developer.android.com/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()`.

**Note:** This method is intended for internal use by carrier
applications or the Telephony framework and will never trigger an SMS disambiguation
dialog. If this method is called on a device that has multiple active subscriptions, this
`https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined
default subscription is defined, the subscription ID associated with this message will be
INVALID, which will result in the SMS being injected on the subscription associated with
logical slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the SMS is
delivered to the correct subscription.
.   
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 />

<br />

| Parameters ||
|---|---|
| `pdu` | `byte`: is the byte array of pdu to be injected into android application framework <br /> |
| `format` | `String`: is the format of SMS pdu (`https://developer.android.com/reference/android/telephony/SmsMessage#FORMAT_3GPP` or `https://developer.android.com/reference/android/telephony/SmsMessage#FORMAT_3GPP2`). Value is one of the following: - `https://developer.android.com/reference/android/telephony/SmsMessage#FORMAT_3GPP` - `https://developer.android.com/reference/android/telephony/SmsMessage#FORMAT_3GPP2` |
| `receivedIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is successfully received by the android application framework, or failed. This intent is broadcasted at the same time an SMS received from radio is acknowledged back. The result code will be `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_HANDLED` for success, or `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_GENERIC_ERROR` or `https://developer.android.com/reference/android/telephony/SmsManager#RESULT_REMOTE_EXCEPTION` for error. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the format 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_MESSAGING`. |

### sendDataMessage

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

```
public void sendDataMessage (String destinationAddress, 
                String scAddress, 
                short destinationPort, 
                byte[] data, 
                PendingIntent sentIntent, 
                PendingIntent deliveryIntent)
```

Send a data based SMS to a specific application port.

**Note:** Using this method requires that your app has the
`https://developer.android.com/reference/android/Manifest.permission#SEND_SMS` permission.

**Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this
manager on a multi-SIM device, this operation may fail sending the SMS message because no
suitable default subscription could be found. In this case, if `sentIntent` is
non-null, then the `https://developer.android.com/reference/android/app/PendingIntent` will be sent with an error code
`RESULT_ERROR_GENERIC_FAILURE` and an extra string `"noDefault"` containing the
boolean value `true`. See `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` for more information on the conditions
where this operation may fail.
.   
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 />

<br />

| Parameters ||
|---|---|
| `destinationAddress` | `String`: the address to send the message to <br /> |
| `scAddress` | `String`: is the service center address or null to use the current default SMSC <br /> |
| `destinationPort` | `short`: the port to deliver the message to <br /> |
| `data` | `byte`: the body of the message to send <br /> |
| `sentIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is successfully sent, or failed. The result code will be `Activity.RESULT_OK` for success, or one of these errors: `RESULT_ERROR_GENERIC_FAILURE` `RESULT_ERROR_RADIO_OFF` `RESULT_ERROR_NULL_PDU` `RESULT_ERROR_NO_SERVICE` `RESULT_ERROR_LIMIT_EXCEEDED` `RESULT_ERROR_FDN_CHECK_FAILURE` `RESULT_ERROR_SHORT_CODE_NOT_ALLOWED` `RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED` `RESULT_RADIO_NOT_AVAILABLE` `RESULT_NETWORK_REJECT` `RESULT_INVALID_ARGUMENTS` `RESULT_INVALID_STATE` `RESULT_NO_MEMORY` `RESULT_INVALID_SMS_FORMAT` `RESULT_SYSTEM_ERROR` `RESULT_MODEM_ERROR` `RESULT_NETWORK_ERROR` `RESULT_ENCODING_ERROR` `RESULT_INVALID_SMSC_ADDRESS` `RESULT_OPERATION_NOT_ALLOWED` `RESULT_INTERNAL_ERROR` `RESULT_NO_RESOURCES` `RESULT_CANCELLED` `RESULT_REQUEST_NOT_SUPPORTED` `RESULT_NO_BLUETOOTH_SERVICE` `RESULT_INVALID_BLUETOOTH_ADDRESS` `RESULT_BLUETOOTH_DISCONNECTED` `RESULT_UNEXPECTED_EVENT_STOP_SENDING` `RESULT_SMS_BLOCKED_DURING_EMERGENCY` `RESULT_SMS_SEND_RETRY_FAILED` `RESULT_REMOTE_EXCEPTION` `RESULT_NO_DEFAULT_SMS_APP` `RESULT_RIL_RADIO_NOT_AVAILABLE` `RESULT_RIL_SMS_SEND_FAIL_RETRY` `RESULT_RIL_NETWORK_REJECT` `RESULT_RIL_INVALID_STATE` `RESULT_RIL_INVALID_ARGUMENTS` `RESULT_RIL_NO_MEMORY` `RESULT_RIL_REQUEST_RATE_LIMITED` `RESULT_RIL_INVALID_SMS_FORMAT` `RESULT_RIL_SYSTEM_ERR` `RESULT_RIL_ENCODING_ERR` `RESULT_RIL_INVALID_SMSC_ADDRESS` `RESULT_RIL_MODEM_ERR` `RESULT_RIL_NETWORK_ERR` `RESULT_RIL_INTERNAL_ERR` `RESULT_RIL_REQUEST_NOT_SUPPORTED` `RESULT_RIL_INVALID_MODEM_STATE` `RESULT_RIL_NETWORK_NOT_READY` `RESULT_RIL_OPERATION_NOT_ALLOWED` `RESULT_RIL_NO_RESOURCES` `RESULT_RIL_CANCELLED` `RESULT_RIL_SIM_ABSENT` `RESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED` `RESULT_RIL_ACCESS_BARRED` `RESULT_RIL_BLOCKED_DUE_TO_CALL` For `RESULT_ERROR_GENERIC_FAILURE` or any of the RESULT_RIL errors, the sentIntent may include the extra "errorCode" containing a radio technology specific value, generally only useful for troubleshooting. <br /> |
| `deliveryIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is delivered to the recipient. The raw pdu of the status report is in the extended data ("pdu"). <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if destinationAddress or data are empty |
| `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`. |

### sendMultimediaMessage

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

```
public void sendMultimediaMessage (Context context, 
                Uri contentUri, 
                String locationUrl, 
                Bundle configOverrides, 
                PendingIntent sentIntent)
```

Send an MMS message

**Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this
manager on a multi-SIM device, this operation may fail sending the MMS message because no
suitable default subscription could be found. In this case, if `sentIntent` is
non-null, then the `https://developer.android.com/reference/android/app/PendingIntent` will be sent with an error code
`RESULT_NO_DEFAULT_SMS_APP`. See `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` for more information on the
conditions where this operation may fail.
.   
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 />

<br />

| Parameters ||
|---|---|
| `context` | `Context`: application context <br /> |
| `contentUri` | `Uri`: the content Uri from which the message pdu will be read <br /> |
| `locationUrl` | `String`: the optional location url where message should be sent to <br /> |
| `configOverrides` | `Bundle`: the carrier-specific messaging configuration values to override for sending the message. <br /> |
| `sentIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is successfully sent, or failed The result code will be `Activity.RESULT_OK` for success or one of these errors: `MMS_ERROR_UNSPECIFIED` `MMS_ERROR_INVALID_APN` `MMS_ERROR_UNABLE_CONNECT_MMS` `MMS_ERROR_HTTP_FAILURE` `MMS_ERROR_IO_ERROR` `MMS_ERROR_RETRY` `MMS_ERROR_CONFIGURATION_ERROR` `MMS_ERROR_NO_DATA_NETWORK` `MMS_ERROR_INVALID_SUBSCRIPTION_ID` `MMS_ERROR_INACTIVE_SUBSCRIPTION` `MMS_ERROR_DATA_DISABLED` `MMS_ERROR_MMS_DISABLED_BY_CARRIER` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if contentUri is empty |
| `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`. |

### sendMultimediaMessage

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

```
public void sendMultimediaMessage (Context context, 
                Uri contentUri, 
                String locationUrl, 
                Bundle configOverrides, 
                PendingIntent sentIntent, 
                long messageId)
```

Send an MMS message

Same as `https://developer.android.com/reference/android/telephony/SmsManager#sendMultimediaMessage(android.content.Context,%20android.net.Uri,%20java.lang.String,%20android.os.Bundle,%20android.app.PendingIntent)`, but adds an optional messageId.

**Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this
manager on a multi-SIM device, this operation may fail sending the MMS message because no
suitable default subscription could be found. In this case, if `sentIntent` is
non-null, then the `https://developer.android.com/reference/android/app/PendingIntent` will be sent with an error code
`RESULT_NO_DEFAULT_SMS_APP`. See `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` for more information on the
conditions where this operation may fail.
.   
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 />

<br />

| Parameters ||
|---|---|
| `context` | `Context`: application context. This value cannot be `null`. <br /> |
| `contentUri` | `Uri`: the content Uri from which the message pdu will be read. This value cannot be `null`. <br /> |
| `locationUrl` | `String`: the optional location url where message should be sent to. This value may be `null`. <br /> |
| `configOverrides` | `Bundle`: the carrier-specific messaging configuration values to override for sending the message. This value may be `null`. <br /> |
| `sentIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is successfully sent, or failed The result code will be `Activity.RESULT_OK` for success or one of these errors: `MMS_ERROR_UNSPECIFIED` `MMS_ERROR_INVALID_APN` `MMS_ERROR_UNABLE_CONNECT_MMS` `MMS_ERROR_HTTP_FAILURE` `MMS_ERROR_IO_ERROR` `MMS_ERROR_RETRY` `MMS_ERROR_CONFIGURATION_ERROR` `MMS_ERROR_NO_DATA_NETWORK` `MMS_ERROR_INVALID_SUBSCRIPTION_ID` `MMS_ERROR_INACTIVE_SUBSCRIPTION` `MMS_ERROR_DATA_DISABLED` `MMS_ERROR_MMS_DISABLED_BY_CARRIER` . This value may be `null`. <br /> |
| `messageId` | `long`: an id that uniquely identifies the message requested to be sent. Used for logging and diagnostics purposes. The id may be 0. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if contentUri is empty |
| `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`. |

### sendMultipartTextMessage

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

```
public void sendMultipartTextMessage (String destinationAddress, 
                String scAddress, 
                List<String> parts, 
                List<PendingIntent> sentIntents, 
                List<PendingIntent> deliveryIntents, 
                long messageId)
```

Send a multi-part text based SMS. Same as #sendMultipartTextMessage(String, String,
ArrayList, ArrayList, ArrayList), but adds an optional messageId.


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

| Parameters ||
|---|---|
| `destinationAddress` | `String`: This value cannot be `null`. <br /> |
| `scAddress` | `String`: This value may be `null`. <br /> |
| `parts` | `List`: This value cannot be `null`. <br /> |
| `sentIntents` | `List`: This value may be `null`. <br /> |
| `deliveryIntents` | `List`: This value may be `null`. <br /> |
| `messageId` | `long`: An id that uniquely identifies the message requested to be sent. Used for logging and diagnostics purposes. The id may be 0. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if destinationAddress or data are empty |
| `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`. |

### sendMultipartTextMessage

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

```
public void sendMultipartTextMessage (String destinationAddress, 
                String scAddress, 
                ArrayList<String> parts, 
                ArrayList<PendingIntent> sentIntents, 
                ArrayList<PendingIntent> deliveryIntents)
```

Send a multi-part text based SMS. The callee should have already
divided the message into correctly sized parts by calling
`divideMessage`.

**Note:** Using this method requires that your app has the
`https://developer.android.com/reference/android/Manifest.permission#SEND_SMS` permission.

**Note:** Beginning with Android 4.4 (API level 19), if
*and only if* an app is not selected as the default SMS app, the system automatically
writes messages sent using this method to the SMS Provider (the default SMS app is always
responsible for writing its sent messages to the SMS Provider). For information about
how to behave as the default SMS app, see `https://developer.android.com/reference/android/provider/Telephony`.

**Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this
manager on a multi-SIM device, this operation may fail sending the SMS message because no
suitable default subscription could be found. In this case, if `sentIntent` is
non-null, then the `https://developer.android.com/reference/android/app/PendingIntent` will be sent with an error code
`RESULT_ERROR_GENERIC_FAILURE` and an extra string `"noDefault"` containing the
boolean value `true`. See `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` for more information on the conditions
where this operation may fail.
.   
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 />

<br />

| Parameters ||
|---|---|
| `destinationAddress` | `String`: the address to send the message to <br /> |
| `scAddress` | `String`: is the service center address or null to use the current default SMSC <br /> |
| `parts` | `ArrayList`: an `ArrayList` of strings that, in order, comprise the original message <br /> |
| `sentIntents` | `ArrayList`: if not null, an `ArrayList` of `PendingIntent`s (one for each message part) that is broadcast when the corresponding message part has been sent. The result code will be `Activity.RESULT_OK` for success, or one of these errors: `RESULT_ERROR_GENERIC_FAILURE` `RESULT_ERROR_RADIO_OFF` `RESULT_ERROR_NULL_PDU` `RESULT_ERROR_NO_SERVICE` `RESULT_ERROR_LIMIT_EXCEEDED` `RESULT_ERROR_FDN_CHECK_FAILURE` `RESULT_ERROR_SHORT_CODE_NOT_ALLOWED` `RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED` `RESULT_RADIO_NOT_AVAILABLE` `RESULT_NETWORK_REJECT` `RESULT_INVALID_ARGUMENTS` `RESULT_INVALID_STATE` `RESULT_NO_MEMORY` `RESULT_INVALID_SMS_FORMAT` `RESULT_SYSTEM_ERROR` `RESULT_MODEM_ERROR` `RESULT_NETWORK_ERROR` `RESULT_ENCODING_ERROR` `RESULT_INVALID_SMSC_ADDRESS` `RESULT_OPERATION_NOT_ALLOWED` `RESULT_INTERNAL_ERROR` `RESULT_NO_RESOURCES` `RESULT_CANCELLED` `RESULT_REQUEST_NOT_SUPPORTED` `RESULT_NO_BLUETOOTH_SERVICE` `RESULT_INVALID_BLUETOOTH_ADDRESS` `RESULT_BLUETOOTH_DISCONNECTED` `RESULT_UNEXPECTED_EVENT_STOP_SENDING` `RESULT_SMS_BLOCKED_DURING_EMERGENCY` `RESULT_SMS_SEND_RETRY_FAILED` `RESULT_REMOTE_EXCEPTION` `RESULT_NO_DEFAULT_SMS_APP` `RESULT_RIL_RADIO_NOT_AVAILABLE` `RESULT_RIL_SMS_SEND_FAIL_RETRY` `RESULT_RIL_NETWORK_REJECT` `RESULT_RIL_INVALID_STATE` `RESULT_RIL_INVALID_ARGUMENTS` `RESULT_RIL_NO_MEMORY` `RESULT_RIL_REQUEST_RATE_LIMITED` `RESULT_RIL_INVALID_SMS_FORMAT` `RESULT_RIL_SYSTEM_ERR` `RESULT_RIL_ENCODING_ERR` `RESULT_RIL_INVALID_SMSC_ADDRESS` `RESULT_RIL_MODEM_ERR` `RESULT_RIL_NETWORK_ERR` `RESULT_RIL_INTERNAL_ERR` `RESULT_RIL_REQUEST_NOT_SUPPORTED` `RESULT_RIL_INVALID_MODEM_STATE` `RESULT_RIL_NETWORK_NOT_READY` `RESULT_RIL_OPERATION_NOT_ALLOWED` `RESULT_RIL_NO_RESOURCES` `RESULT_RIL_CANCELLED` `RESULT_RIL_SIM_ABSENT` `RESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED` `RESULT_RIL_ACCESS_BARRED` `RESULT_RIL_BLOCKED_DUE_TO_CALL` For `RESULT_ERROR_GENERIC_FAILURE` or any of the RESULT_RIL errors, the sentIntent may include the extra "errorCode" containing a radio technology specific value, generally only useful for troubleshooting. <br /> |
| `deliveryIntents` | `ArrayList`: if not null, an `ArrayList` of `PendingIntent`s (one for each message part) that is broadcast when the corresponding message part has been delivered to the recipient. The raw pdu of the status report is in the extended data ("pdu"). <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if destinationAddress or data are empty |
| `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`. |

### sendMultipartTextMessage

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

```
public void sendMultipartTextMessage (String destinationAddress, 
                String scAddress, 
                List<String> parts, 
                List<PendingIntent> sentIntents, 
                List<PendingIntent> deliveryIntents, 
                String packageName, 
                String attributionTag)
```

Similar method as #sendMultipartTextMessage(String, String, ArrayList, ArrayList, ArrayList)
With an additional argument.

**Note:** This method is intended for internal use the Telephony
framework and will never trigger an SMS disambiguation dialog. If this method is called on a
device that has multiple active subscriptions, this `https://developer.android.com/reference/android/telephony/SmsManager` instance has been
created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined default subscription is defined, the
subscription ID associated with this message will be INVALID, which will result in the SMS
being sent on the subscription associated with logical slot 0. Use
`https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the SMS is sent on the correct
subscription.
.   
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 />

<br />

| Parameters ||
|---|---|
| `destinationAddress` | `String`: This value cannot be `null`. <br /> |
| `scAddress` | `String`: This value may be `null`. <br /> |
| `parts` | `List`: This value cannot be `null`. <br /> |
| `sentIntents` | `List`: This value may be `null`. <br /> |
| `deliveryIntents` | `List`: This value may be `null`. <br /> |
| `packageName` | `String`: serves as the default package name if the package name that is associated with the user id is null. <br /> |
| `attributionTag` | `String`: 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_MESSAGING`. |

### sendTextMessage

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

```
public void sendTextMessage (String destinationAddress, 
                String scAddress, 
                String text, 
                PendingIntent sentIntent, 
                PendingIntent deliveryIntent, 
                long messageId)
```

Send a text based SMS. Same as `https://developer.android.com/reference/android/telephony/SmsManager#sendTextMessage(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.app.PendingIntent,%20android.app.PendingIntent)`, but
adds an optional messageId.


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

| Parameters ||
|---|---|
| `destinationAddress` | `String`: This value cannot be `null`. <br /> |
| `scAddress` | `String`: This value may be `null`. <br /> |
| `text` | `String`: This value cannot be `null`. <br /> |
| `sentIntent` | `PendingIntent`: This value may be `null`. <br /> |
| `deliveryIntent` | `PendingIntent`: This value may be `null`. <br /> |
| `messageId` | `long`: An id that uniquely identifies the message requested to be sent. Used for logging and diagnostics purposes. The id may be 0. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if destinationAddress or text are empty |
| `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`. |

### sendTextMessage

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

```
public void sendTextMessage (String destinationAddress, 
                String scAddress, 
                String text, 
                PendingIntent sentIntent, 
                PendingIntent deliveryIntent)
```

Send a text based SMS.

**Note:** Using this method requires that your app has the
`https://developer.android.com/reference/android/Manifest.permission#SEND_SMS` permission.

**Note:** Beginning with Android 4.4 (API level 19), if
*and only if* an app is not selected as the default SMS app, the system automatically
writes messages sent using this method to the SMS Provider (the default SMS app is always
responsible for writing its sent messages to the SMS Provider). For information about
how to behave as the default SMS app, see `https://developer.android.com/reference/android/provider/Telephony`.

**Note:** If `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` is used to instantiate this
manager on a multi-SIM device, this operation may fail sending the SMS message because no
suitable default subscription could be found. In this case, if `sentIntent` is
non-null, then the `https://developer.android.com/reference/android/app/PendingIntent` will be sent with an error code
`RESULT_ERROR_GENERIC_FAILURE` and an extra string `"noDefault"` containing the
boolean value `true`. See `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()` for more information on the conditions
where this operation may fail.
.   
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 />

<br />

| Parameters ||
|---|---|
| `destinationAddress` | `String`: the address to send the message to <br /> |
| `scAddress` | `String`: is the service center address or null to use the current default SMSC <br /> |
| `text` | `String`: the body of the message to send <br /> |
| `sentIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is successfully sent, or failed. The result code will be `Activity.RESULT_OK` for success, or one of these errors: `RESULT_ERROR_GENERIC_FAILURE` `RESULT_ERROR_RADIO_OFF` `RESULT_ERROR_NULL_PDU` `RESULT_ERROR_NO_SERVICE` `RESULT_ERROR_LIMIT_EXCEEDED` `RESULT_ERROR_FDN_CHECK_FAILURE` `RESULT_ERROR_SHORT_CODE_NOT_ALLOWED` `RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED` `RESULT_RADIO_NOT_AVAILABLE` `RESULT_NETWORK_REJECT` `RESULT_INVALID_ARGUMENTS` `RESULT_INVALID_STATE` `RESULT_NO_MEMORY` `RESULT_INVALID_SMS_FORMAT` `RESULT_SYSTEM_ERROR` `RESULT_MODEM_ERROR` `RESULT_NETWORK_ERROR` `RESULT_ENCODING_ERROR` `RESULT_INVALID_SMSC_ADDRESS` `RESULT_OPERATION_NOT_ALLOWED` `RESULT_INTERNAL_ERROR` `RESULT_NO_RESOURCES` `RESULT_CANCELLED` `RESULT_REQUEST_NOT_SUPPORTED` `RESULT_NO_BLUETOOTH_SERVICE` `RESULT_INVALID_BLUETOOTH_ADDRESS` `RESULT_BLUETOOTH_DISCONNECTED` `RESULT_UNEXPECTED_EVENT_STOP_SENDING` `RESULT_SMS_BLOCKED_DURING_EMERGENCY` `RESULT_SMS_SEND_RETRY_FAILED` `RESULT_REMOTE_EXCEPTION` `RESULT_NO_DEFAULT_SMS_APP` `RESULT_RIL_RADIO_NOT_AVAILABLE` `RESULT_RIL_SMS_SEND_FAIL_RETRY` `RESULT_RIL_NETWORK_REJECT` `RESULT_RIL_INVALID_STATE` `RESULT_RIL_INVALID_ARGUMENTS` `RESULT_RIL_NO_MEMORY` `RESULT_RIL_REQUEST_RATE_LIMITED` `RESULT_RIL_INVALID_SMS_FORMAT` `RESULT_RIL_SYSTEM_ERR` `RESULT_RIL_ENCODING_ERR` `RESULT_RIL_INVALID_SMSC_ADDRESS` `RESULT_RIL_MODEM_ERR` `RESULT_RIL_NETWORK_ERR` `RESULT_RIL_INTERNAL_ERR` `RESULT_RIL_REQUEST_NOT_SUPPORTED` `RESULT_RIL_INVALID_MODEM_STATE` `RESULT_RIL_NETWORK_NOT_READY` `RESULT_RIL_OPERATION_NOT_ALLOWED` `RESULT_RIL_NO_RESOURCES` `RESULT_RIL_CANCELLED` `RESULT_RIL_SIM_ABSENT` `RESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED` `RESULT_RIL_ACCESS_BARRED` `RESULT_RIL_BLOCKED_DUE_TO_CALL` For `RESULT_ERROR_GENERIC_FAILURE` or any of the RESULT_RIL errors, the sentIntent may include the extra "errorCode" containing a radio technology specific value, generally only useful for troubleshooting. <br /> |
| `deliveryIntent` | `PendingIntent`: if not NULL this `PendingIntent` is broadcast when the message is delivered to the recipient. The raw pdu of the status report is in the extended data ("pdu"). <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if destinationAddress or text are empty |
| `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`. |

### sendTextMessageWithoutPersisting

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

```
public void sendTextMessageWithoutPersisting (String destinationAddress, 
                String scAddress, 
                String text, 
                PendingIntent sentIntent, 
                PendingIntent deliveryIntent)
```

Send a text based SMS without writing it into the SMS Provider.


The message will be sent directly over the network and will not be visible in SMS
applications. Intended for internal carrier use only.

Requires Permission: Both `https://developer.android.com/reference/android/Manifest.permission#SEND_SMS` and
`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()`), or that the calling app is
the default IMS app (see
`https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING`).

**Note:** This method is intended for internal use by carrier
applications or the Telephony framework and will never trigger an SMS disambiguation
dialog. If this method is called on a device that has multiple active subscriptions, this
`https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined
default subscription is defined, the subscription ID associated with this message will be
INVALID, which will result in the SMS being sent on the subscription associated with logical
slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the SMS is sent on the
correct subscription.
.   
Requires `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE` and `https://developer.android.com/reference/android/Manifest.permission#SEND_SMS`   
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 />

<br />

| Parameters ||
|---|---|
| `destinationAddress` | `String` <br /> |
| `scAddress` | `String` <br /> |
| `text` | `String` <br /> |
| `sentIntent` | `PendingIntent` <br /> |
| `deliveryIntent` | `PendingIntent` <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`. |

**See also:**

- `https://developer.android.com/reference/android/telephony/SmsManager#sendTextMessage(java.lang.String,%20java.lang.String,%20java.lang.String,%20android.app.PendingIntent,%20android.app.PendingIntent)`

### setSmscAddress

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

```
public boolean setSmscAddress (String smsc)
```

Sets the SMSC address on (U)SIM.

**Note:** Using this method requires that your app is the
default SMS application, or has `https://developer.android.com/reference/android/Manifest.permission#MODIFY_PHONE_STATE`
permission, or has the carrier privileges.

**Note:** This method will never trigger an SMS disambiguation
dialog. If this method is called on a device that has multiple active subscriptions, this
`https://developer.android.com/reference/android/telephony/SmsManager` instance has been created with `https://developer.android.com/reference/android/telephony/SmsManager#getDefault()`, and no user-defined
default subscription is defined, the subscription ID associated with this method will be
INVALID, which will result in the operation being completed on the subscription associated
with logical slot 0. Use `https://developer.android.com/reference/android/telephony/SmsManager#getSmsManagerForSubscriptionId(int)` to ensure the operation
is performed on the correct subscription.
.   
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_MESSAGING` feature which can be detected using `https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)`.

<br />

<br />

| Parameters ||
|---|---|
| `smsc` | `String`: the SMSC address string. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | true for success, false otherwise. Failure can be due modem returning an error. <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`. |