Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/telephony/gsm/SmsManager#constants) \| [Methods](https://developer.android.com/reference/android/telephony/gsm/SmsManager#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telephony/gsm/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.gsm.SmsManager |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 4.**   

Replaced by android.telephony.SmsManager that supports both GSM and CDMA.

Manages SMS operations such as sending data, text, and pdu SMS messages. Get this object by calling the static method SmsManager.getDefault().

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#RESULT_ERROR_GENERIC_FAILURE` *This constant is deprecated. Use android.telephony.SmsManager.* |
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#RESULT_ERROR_NO_SERVICE` *This constant is deprecated. Use android.telephony.SmsManager.* |
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#RESULT_ERROR_NULL_PDU` *This constant is deprecated. Use android.telephony.SmsManager.* |
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#RESULT_ERROR_RADIO_OFF` *This constant is deprecated. Use android.telephony.SmsManager.* |
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#STATUS_ON_SIM_FREE` *This constant is deprecated. Use android.telephony.SmsManager.* |
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#STATUS_ON_SIM_READ` *This constant is deprecated. Use android.telephony.SmsManager.* |
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#STATUS_ON_SIM_SENT` *This constant is deprecated. Use android.telephony.SmsManager.* |
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#STATUS_ON_SIM_UNREAD` *This constant is deprecated. Use android.telephony.SmsManager.* |
| `int` | `https://developer.android.com/reference/android/telephony/gsm/SmsManager#STATUS_ON_SIM_UNSENT` *This constant is deprecated. Use android.telephony.SmsManager.* |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/telephony/gsm/SmsManager#divideMessage(java.lang.String)(https://developer.android.com/reference/java/lang/String text) ` *This method is deprecated. Use android.telephony.SmsManager.* |
| ` static https://developer.android.com/reference/android/telephony/gsm/SmsManager` | ` https://developer.android.com/reference/android/telephony/gsm/SmsManager#getDefault()() ` *This method is deprecated. Use android.telephony.SmsManager.* |
| ` void` | ` https://developer.android.com/reference/android/telephony/gsm/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) ` *This method is deprecated. Use android.telephony.SmsManager.* |
| ` void` | ` https://developer.android.com/reference/android/telephony/gsm/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) ` *This method is deprecated. Use android.telephony.SmsManager.* |
| ` void` | ` https://developer.android.com/reference/android/telephony/gsm/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) ` *This method is deprecated. Use android.telephony.SmsManager.* |

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

### RESULT_ERROR_GENERIC_FAILURE

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

```
public static final int RESULT_ERROR_GENERIC_FAILURE
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Generic failure cause

<br />

Constant Value: 1 (0x00000001)

### RESULT_ERROR_NO_SERVICE

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

```
public static final int RESULT_ERROR_NO_SERVICE
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Failed because service is currently unavailable

<br />

Constant Value: 4 (0x00000004)

### RESULT_ERROR_NULL_PDU

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

```
public static final int RESULT_ERROR_NULL_PDU
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Failed because no pdu provided

<br />

Constant Value: 3 (0x00000003)

### RESULT_ERROR_RADIO_OFF

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

```
public static final int RESULT_ERROR_RADIO_OFF
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Failed because radio was explicitly turned off

<br />

Constant Value: 2 (0x00000002)

### STATUS_ON_SIM_FREE

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

```
public static final int STATUS_ON_SIM_FREE
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Free space (TS 51.011 10.5.3).

<br />

Constant Value: 0 (0x00000000)

### STATUS_ON_SIM_READ

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

```
public static final int STATUS_ON_SIM_READ
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Received and read (TS 51.011 10.5.3).

<br />

Constant Value: 1 (0x00000001)

### STATUS_ON_SIM_SENT

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

```
public static final int STATUS_ON_SIM_SENT
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Stored and sent (TS 51.011 10.5.3).

<br />

Constant Value: 5 (0x00000005)

### STATUS_ON_SIM_UNREAD

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

```
public static final int STATUS_ON_SIM_UNREAD
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Received and unread (TS 51.011 10.5.3).

<br />

Constant Value: 3 (0x00000003)

### STATUS_ON_SIM_UNSENT

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

```
public static final int STATUS_ON_SIM_UNSENT
```

<br />

**This constant is deprecated.**   

Use android.telephony.SmsManager.

Stored and unsent (TS 51.011 10.5.3).

<br />

Constant Value: 7 (0x00000007)

## Public methods

### divideMessage

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

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

<br />

**This method is deprecated.**   

Use android.telephony.SmsManager.

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

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

### getDefault

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

```
public static SmsManager getDefault ()
```

<br />

**This method is deprecated.**   

Use android.telephony.SmsManager.

Get the default instance of the SmsManager

<br />

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

### sendDataMessage

Added in [API level 1](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)
```

<br />

**This method is deprecated.**   

Use android.telephony.SmsManager.

Send a data based SMS to a specific application port.

<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 sucessfully 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`. The per-application based SMS control checks sentIntent. If sentIntent is NULL the caller will be checked against all unknown applicaitons, which cause smaller number of SMS to be sent in checking period. <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 |

### sendMultipartTextMessage

Added in [API level 1](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)
```

<br />

**This method is deprecated.**   

Use android.telephony.SmsManager.

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

<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`. The per-application based SMS control checks sentIntent. If sentIntent is NULL the caller will be checked against all unknown applicaitons, which cause smaller number of SMS to be sent in checking period. <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 |

### sendTextMessage

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

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

<br />

**This method is deprecated.**   

Use android.telephony.SmsManager.

Send a text based SMS.

<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`. The per-application based SMS control checks sentIntent. If sentIntent is NULL the caller will be checked against all unknown applications, which cause smaller number of SMS to be sent in checking period. <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 |