# CarrierMessagingService.SendSmsResult

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

# SendSmsResult

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/service/carrier/CarrierMessagingService.SendSmsResult "View this page in Java")  

```
class SendSmsResult
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                 ||
| ↳ | [android.service.carrier.CarrierMessagingService.SendSmsResult](https://developer.android.com/reference/kotlin/android/service/carrier/CarrierMessagingService.SendSmsResult#) |

The result of sending an SMS.

## Summary

|                                                                                                                                                                                                                       Public constructors                                                                                                                                                                                                                       ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [SendSmsResult](https://developer.android.com/reference/kotlin/android/service/carrier/CarrierMessagingService.SendSmsResult#SendSmsResult(kotlin.Int,%20kotlin.Int))`(`sendStatus:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `messageRef:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructs a SendSmsResult with the send status and message reference for the just-sent SMS. |

|                                                                                                                                  Public methods                                                                                                                                   ||
|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getMessageRef](https://developer.android.com/reference/kotlin/android/service/carrier/CarrierMessagingService.SendSmsResult#getMessageRef())`()` Returns the message reference of the just-sent SMS. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getSendStatus](https://developer.android.com/reference/kotlin/android/service/carrier/CarrierMessagingService.SendSmsResult#getSendStatus())`()` Returns the send status of the just-sent SMS.       |

## Public constructors

### SendSmsResult

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

```
SendSmsResult(
    sendStatus: Int, 
    messageRef: Int)
```

Constructs a SendSmsResult with the send status and message reference for the just-sent SMS.

|                                                                                                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                                                                                                ||
|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `sendStatus` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): send status, one of [SEND_STATUS_OK](https://developer.android.com/reference/kotlin/android/service/carrier/CarrierMessagingService#SEND_STATUS_OK:kotlin.Int), [SEND_STATUS_RETRY_ON_CARRIER_NETWORK](https://developer.android.com/reference/kotlin/android/service/carrier/CarrierMessagingService#SEND_STATUS_RETRY_ON_CARRIER_NETWORK:kotlin.Int), and [SEND_STATUS_ERROR](https://developer.android.com/reference/kotlin/android/service/carrier/CarrierMessagingService#SEND_STATUS_ERROR:kotlin.Int). |
| `messageRef` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): message reference of the just-sent SMS. This field is applicable only if send status is [SEND_STATUS_OK](https://developer.android.com/reference/kotlin/android/service/carrier/CarrierMessagingService#SEND_STATUS_OK:kotlin.Int).                                                                                                                                                                                                                                                                           |

## Public methods

### getMessageRef

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

```
fun getMessageRef(): Int
```

Returns the message reference of the just-sent SMS.

|                                              Return                                               ||
|----------------------------------------------------------------------------|-----------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the message reference |

### getSendStatus

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

```
fun getSendStatus(): Int
```

Returns the send status of the just-sent SMS.

|                                           Return                                            ||
|----------------------------------------------------------------------------|-----------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the send status |