Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#constants) \| [Methods](https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#inhmethods)

# Telephony.Sms.Intents

*** ** * ** ***

` public static final class Telephony.Sms.Intents `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.Telephony.Sms.Intents |

<br />

*** ** * ** ***

Contains constants for SMS related Intents that are broadcast.

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_CHANGE_DEFAULT` Activity action: Ask the user to change the default SMS application. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_DEFAULT_SMS_PACKAGE_CHANGED` Broadcast action: When the default SMS package changes, the previous default SMS package and the new default SMS package are sent this broadcast to notify them of the change. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_EXTERNAL_PROVIDER_CHANGE` Broadcast action: When a change is made to the SmsProvider or MmsProvider by a process other than the default SMS application, this intent is broadcast to the default SMS application so it can re-sync or update the change. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#DATA_SMS_RECEIVED_ACTION` Broadcast Action: A new data based SMS message has been received by the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#EXTRA_IS_DEFAULT_SMS_APP` The IsDefaultSmsApp boolean passed as an extra for `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_DEFAULT_SMS_PACKAGE_CHANGED` to indicate whether the SMS app is becoming the default SMS app or is no longer the default. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#EXTRA_PACKAGE_NAME` The PackageName string passed in as an extra for `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_CHANGE_DEFAULT` |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_DATABASE_ERROR` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a telephony database error. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_DISPATCH_FAILURE` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a dispatch failure. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_DUPLICATED` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a duplicate incoming message. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_GENERIC_ERROR` Set by BroadcastReceiver to indicate a generic error while processing the message. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_HANDLED` Set by BroadcastReceiver to indicate that the message was handled successfully. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_INVALID_URI` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate an invalid uri. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_NULL_MESSAGE` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a null message was encountered. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_NULL_PDU` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a null PDU was received. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_OUT_OF_MEMORY` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate insufficient memory to store the message. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_RECEIVED_WHILE_ENCRYPTED` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate an sms was received while the phone was in encrypted state. |
| `int` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_UNSUPPORTED` Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate that the message, while possibly valid, is of a format or encoding that is not supported. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SECRET_CODE_ACTION` *This constant was deprecated in API level 29. it is no longer supported, use `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SECRET_CODE` instead* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SIM_FULL_ACTION` Broadcast Action: The SIM storage for SMS messages is full. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_CB_RECEIVED_ACTION` Broadcast Action: A new Cell Broadcast message has been received by the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_DELIVER_ACTION` Broadcast Action: A new text-based SMS message has been received by the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_RECEIVED_ACTION` Broadcast Action: A new text-based SMS message has been received by the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` Broadcast Action: An incoming SMS has been rejected by the telephony framework. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED_ACTION` Broadcast Action: A new CDMA SMS has been received containing Service Category Program Data (updates the list of enabled broadcast channels). |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#WAP_PUSH_DELIVER_ACTION` Broadcast Action: A new WAP PUSH message has been received by the device. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#WAP_PUSH_RECEIVED_ACTION` Broadcast Action: A new WAP PUSH message has been received by the device. |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/telephony/SmsMessage` | ` https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#getMessagesFromIntent(android.content.Intent)(https://developer.android.com/reference/android/content/Intent intent) ` Read the PDUs out of an `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_RECEIVED_ACTION` or a `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#DATA_SMS_RECEIVED_ACTION` intent. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

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

## Constants

### ACTION_CHANGE_DEFAULT

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

```
public static final String ACTION_CHANGE_DEFAULT
```

Activity action: Ask the user to change the default SMS application. This will show a dialog that asks the user whether they want to replace the current default SMS application with the one specified in `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#EXTRA_PACKAGE_NAME`.

This is no longer supported since Q, please use `https://developer.android.com/reference/android/app/role/RoleManager#createRequestRoleIntent(java.lang.String)` with `https://developer.android.com/reference/android/app/role/RoleManager#ROLE_SMS` instead.

<br />

Constant Value: "android.provider.Telephony.ACTION_CHANGE_DEFAULT"

### ACTION_DEFAULT_SMS_PACKAGE_CHANGED

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

```
public static final String ACTION_DEFAULT_SMS_PACKAGE_CHANGED
```

Broadcast action: When the default SMS package changes, the previous default SMS package and the new default SMS package are sent this broadcast to notify them of the change. A boolean is specified in `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#EXTRA_IS_DEFAULT_SMS_APP` to indicate whether the package is the new default SMS package.

<br />

Constant Value: "android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED"

### ACTION_EXTERNAL_PROVIDER_CHANGE

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

```
public static final String ACTION_EXTERNAL_PROVIDER_CHANGE
```

Broadcast action: When a change is made to the SmsProvider or MmsProvider by a process other than the default SMS application, this intent is broadcast to the default SMS application so it can re-sync or update the change. The uri that was used to call the provider can be retrieved from the intent with getData(). The actual affected uris (which would depend on the selection specified) are not included.

<br />

Constant Value: "android.provider.action.EXTERNAL_PROVIDER_CHANGE"

### DATA_SMS_RECEIVED_ACTION

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

```
public static final String DATA_SMS_RECEIVED_ACTION
```

Broadcast Action: A new data based SMS message has been received by the device. This intent will be delivered to all registered receivers as a notification. The intent will have the following extra values:

- *"pdus"* - An Object\[\] of byte\[\]s containing the PDUs that make up the message.

The extra values can be extracted using `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#getMessagesFromIntent(android.content.Intent)`.

If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_SMS` to receive.

<br />

<br />

Constant Value: "android.intent.action.DATA_SMS_RECEIVED"

### EXTRA_IS_DEFAULT_SMS_APP

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

```
public static final String EXTRA_IS_DEFAULT_SMS_APP
```

The IsDefaultSmsApp boolean passed as an extra for `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_DEFAULT_SMS_PACKAGE_CHANGED` to indicate whether the SMS app is becoming the default SMS app or is no longer the default.

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_DEFAULT_SMS_PACKAGE_CHANGED`

Constant Value: "android.provider.extra.IS_DEFAULT_SMS_APP"

### EXTRA_PACKAGE_NAME

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

```
public static final String EXTRA_PACKAGE_NAME
```

The PackageName string passed in as an extra for `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_CHANGE_DEFAULT`

<br />

**See also:**

- `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_CHANGE_DEFAULT`

  `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#ACTION_CHANGE_DEFAULT`

Constant Value: "package"

### RESULT_SMS_DATABASE_ERROR

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

```
public static final int RESULT_SMS_DATABASE_ERROR
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a telephony database error.

<br />

Constant Value: 10 (0x0000000a)

### RESULT_SMS_DISPATCH_FAILURE

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

```
public static final int RESULT_SMS_DISPATCH_FAILURE
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a dispatch failure.

<br />

Constant Value: 6 (0x00000006)

### RESULT_SMS_DUPLICATED

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

```
public static final int RESULT_SMS_DUPLICATED
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a duplicate incoming message.

<br />

Constant Value: 5 (0x00000005)

### RESULT_SMS_GENERIC_ERROR

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

```
public static final int RESULT_SMS_GENERIC_ERROR
```

Set by BroadcastReceiver to indicate a generic error while processing the message.

<br />

Constant Value: 2 (0x00000002)

### RESULT_SMS_HANDLED

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

```
public static final int RESULT_SMS_HANDLED
```

Set by BroadcastReceiver to indicate that the message was handled successfully.

<br />

Constant Value: 1 (0x00000001)

### RESULT_SMS_INVALID_URI

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

```
public static final int RESULT_SMS_INVALID_URI
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate an invalid uri.

<br />

Constant Value: 11 (0x0000000b)

### RESULT_SMS_NULL_MESSAGE

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

```
public static final int RESULT_SMS_NULL_MESSAGE
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a null message was encountered.

<br />

Constant Value: 8 (0x00000008)

### RESULT_SMS_NULL_PDU

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

```
public static final int RESULT_SMS_NULL_PDU
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate a null PDU was received.

<br />

Constant Value: 7 (0x00000007)

### RESULT_SMS_OUT_OF_MEMORY

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

```
public static final int RESULT_SMS_OUT_OF_MEMORY
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate insufficient memory to store the message.

<br />

Constant Value: 3 (0x00000003)

### RESULT_SMS_RECEIVED_WHILE_ENCRYPTED

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

```
public static final int RESULT_SMS_RECEIVED_WHILE_ENCRYPTED
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate an sms was received while the phone was in encrypted state.

This result code is only used on devices that use Full Disk Encryption. Support for Full Disk Encryption was entirely removed in API level 33, having been replaced by File Based Encryption. Devices that use File Based Encryption never reject incoming SMS messages due to the encryption state.

<br />

Constant Value: 9 (0x00000009)

### RESULT_SMS_UNSUPPORTED

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

```
public static final int RESULT_SMS_UNSUPPORTED
```

Set as a "result" extra in the `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_REJECTED_ACTION` intent to indicate that the message, while possibly valid, is of a format or encoding that is not supported.

<br />

Constant Value: 4 (0x00000004)

### SECRET_CODE_ACTION

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

```
public static final String SECRET_CODE_ACTION
```

<br />

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

it is no longer supported, use `https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_SECRET_CODE` instead

Broadcast Action: A debug code has been entered in the dialer. This intent is broadcast by the system and OEM telephony apps may need to receive these broadcasts. These "secret codes" are used to activate developer menus by dialing certain codes. And they are of the form `*#*#<code>#*#*`. The intent will have the data URI: `android_secret_code://<code>`. It is possible that a manifest receiver would be woken up even if it is not currently running.

Requires `android.Manifest.permission#CONTROL_INCALL_EXPERIENCE` to send and receive.

<br />

<br />

Constant Value: "android.provider.Telephony.SECRET_CODE"

### SIM_FULL_ACTION

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

```
public static final String SIM_FULL_ACTION
```

Broadcast Action: The SIM storage for SMS messages is full. If space is not freed, messages targeted for the SIM (class 2) may not be saved.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_SMS` to receive.

<br />

<br />

Constant Value: "android.provider.Telephony.SIM_FULL"

### SMS_CB_RECEIVED_ACTION

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

```
public static final String SMS_CB_RECEIVED_ACTION
```

Broadcast Action: A new Cell Broadcast message has been received by the device. The intent will have the following extra values:

- *"message"* - An SmsCbMessage object containing the broadcast message data. This is not an emergency alert, so ETWS and CMAS data will be null.

The extra values can be extracted using `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#getMessagesFromIntent(android.content.Intent)`.

If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_SMS` to receive.

<br />

<br />

Constant Value: "android.provider.Telephony.SMS_CB_RECEIVED"

### SMS_DELIVER_ACTION

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

```
public static final String SMS_DELIVER_ACTION
```

Broadcast Action: A new text-based SMS message has been received by the device. This intent will only be delivered to the default sms app. That app is responsible for writing the message and notifying the user. The intent will have the following extra values:

- *"pdus"* - An Object\[\] of byte\[\]s containing the PDUs that make up the message.
- *"format"* - A String describing the format of the PDUs. It can be either "3gpp" or "3gpp2".
- *"subscription"* - An optional long value of the subscription id which received the message.
- *"slot"* - An optional int value of the SIM slot containing the subscription.
- *"phone"* - An optional int value of the phone id associated with the subscription.
- *"errorCode"* - An optional int error code associated with receiving the message.
- *"NETWORK_SECURITY_EVENT_ALERT_CATEGORY"* - An optional int indicating the `https://developer.android.com/` detected for the SMS message.

The extra values can be extracted using `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#getMessagesFromIntent(android.content.Intent)`.

If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.

**Note:** The broadcast receiver that filters for this intent must declare `https://developer.android.com/reference/android/Manifest.permission#BROADCAST_SMS` as a required permission in the [`<receiver>`](https://developer.android.com/guide/topics/manifest/receiver-element) tag.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_SMS` to receive.

<br />

<br />

Constant Value: "android.provider.Telephony.SMS_DELIVER"

### SMS_RECEIVED_ACTION

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

```
public static final String SMS_RECEIVED_ACTION
```

Broadcast Action: A new text-based SMS message has been received by the device. This intent will be delivered to all registered receivers as a notification. These apps are not expected to write the message or notify the user. The intent will have the following extra values:

- *"pdus"* - An Object\[\] of byte\[\]s containing the PDUs that make up the message.
- *"NETWORK_SECURITY_EVENT_ALERT_CATEGORY"* - An optional int indicating the `https://developer.android.com/` detected for the SMS message.

The extra values can be extracted using `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#getMessagesFromIntent(android.content.Intent)`.

If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.

If the SMS message contains an SMS retriever hash, the intent will only be delivered to the app corresponding to the SMS retriever hash, and the list of apps listed `https://developer.android.com/reference/android/provider/Telephony.Sms`.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_SMS` to receive.

<br />

<br />

Constant Value: "android.provider.Telephony.SMS_RECEIVED"

### SMS_REJECTED_ACTION

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

```
public static final String SMS_REJECTED_ACTION
```

Broadcast Action: An incoming SMS has been rejected by the telephony framework. This intent is sent in lieu of any of the RECEIVED_ACTION intents. The intent will have the following extra value:

- *"result"* - An int result code, e.g. `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#RESULT_SMS_OUT_OF_MEMORY` indicating the error returned to the network.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_SMS` to receive.

<br />

<br />

Constant Value: "android.provider.Telephony.SMS_REJECTED"

### SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED_ACTION

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

```
public static final String SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED_ACTION
```

Broadcast Action: A new CDMA SMS has been received containing Service Category Program Data (updates the list of enabled broadcast channels). The intent will have the following extra values:

- *"operations"* - An array of CdmaSmsCbProgramData objects containing the service category operations (add/delete/clear) to perform.

The extra values can be extracted using `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#getMessagesFromIntent(android.content.Intent)`.

If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_SMS` to receive.

<br />

<br />

Constant Value: "android.provider.Telephony.SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED"

### WAP_PUSH_DELIVER_ACTION

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

```
public static final String WAP_PUSH_DELIVER_ACTION
```

Broadcast Action: A new WAP PUSH message has been received by the device. This intent will only be delivered to the default sms app. That app is responsible for writing the message and notifying the user. The intent will have the following extra values:

- *"transactionId"* - (Integer) The WAP transaction ID
- *"pduType"* - (Integer) The WAP PDU type
- *"header"* - (byte\[\]) The header of the message
- *"data"* - (byte\[\]) The data payload of the message
- *"contentTypeParameters"* -(HashMap\<String,String\>) Any parameters associated with the content type (decoded from the WSP Content-Type header)
- *"subscription"* - An optional long value of the subscription id which received the message.
- *"slot"* - An optional int value of the SIM slot containing the subscription.
- *"phone"* - An optional int value of the phone id associated with the subscription.

If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.

The contentTypeParameters extra value is map of content parameters keyed by their names.

If any unassigned well-known parameters are encountered, the key of the map will be 'unassigned/0x...', where '...' is the hex value of the unassigned parameter. If a parameter has No-Value the value in the map will be null.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_MMS` or `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_WAP_PUSH` (depending on WAP PUSH type) to receive.

**Note:** The broadcast receiver that filters for this intent must declare `https://developer.android.com/reference/android/Manifest.permission#BROADCAST_WAP_PUSH` as a required permission in the [`<receiver>`](https://developer.android.com/guide/topics/manifest/receiver-element) tag.

<br />

Constant Value: "android.provider.Telephony.WAP_PUSH_DELIVER"

### WAP_PUSH_RECEIVED_ACTION

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

```
public static final String WAP_PUSH_RECEIVED_ACTION
```

Broadcast Action: A new WAP PUSH message has been received by the device. This intent will be delivered to all registered receivers as a notification. These apps are not expected to write the message or notify the user. The intent will have the following extra values:

- *"transactionId"* - (Integer) The WAP transaction ID
- *"pduType"* - (Integer) The WAP PDU type
- *"header"* - (byte\[\]) The header of the message
- *"data"* - (byte\[\]) The data payload of the message
- *"contentTypeParameters"* - (HashMap\<String,String\>) Any parameters associated with the content type (decoded from the WSP Content-Type header)

If a BroadcastReceiver encounters an error while processing this intent it should set the result code appropriately.

The contentTypeParameters extra value is map of content parameters keyed by their names.

If any unassigned well-known parameters are encountered, the key of the map will be 'unassigned/0x...', where '...' is the hex value of the unassigned parameter. If a parameter has No-Value the value in the map will be null.

Requires `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_MMS` or `https://developer.android.com/reference/android/Manifest.permission#RECEIVE_WAP_PUSH` (depending on WAP PUSH type) to receive.

<br />

<br />

Constant Value: "android.provider.Telephony.WAP_PUSH_RECEIVED"

## Public methods

### getMessagesFromIntent

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

```
public static SmsMessage[] getMessagesFromIntent (Intent intent)
```

Read the PDUs out of an `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_RECEIVED_ACTION` or a `https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#DATA_SMS_RECEIVED_ACTION` intent.

<br />

| Parameters ||
|---|---|
| `intent` | `Intent`: the intent to read from <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telephony/SmsMessage` | an array of SmsMessages for the PDUs <br /> |