# TelephonyManager.CallComposerException

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

# CallComposerException

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/telephony/TelephonyManager.CallComposerException "View this page in Java")  

```
open class CallComposerException : Exception
```

|---|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                             ||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)                                                                              |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/kotlin/java/lang/Exception.html#)                                                                         ||
|   |   | ↳ | [android.telephony.TelephonyManager.CallComposerException](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#) |

Exception that may be supplied to the callback in #uploadCallComposerPicture if something goes awry.

## Summary

|                                                                                                                                                                                                                                          Constants                                                                                                                                                                                                                                          ||
|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_AUTHENTICATION_FAILED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_AUTHENTICATION_FAILED:kotlin.Int) Indicates that the device failed to authenticate with the carrier when uploading the picture.                                                                                                                               |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_FILE_TOO_LARGE](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_FILE_TOO_LARGE:kotlin.Int) Indicates that the file or stream supplied exceeds the size limit defined in[getMaximumCallComposerPictureSize()](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager#getMaximumCallComposerPictureSize()). |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_INPUT_CLOSED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_INPUT_CLOSED:kotlin.Int) Indicates that the[InputStream](https://developer.android.com/reference/kotlin/java/io/InputStream.html#)passed to #uploadCallComposerPicture was closed.                                                                                     |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_IO_EXCEPTION](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_IO_EXCEPTION:kotlin.Int) Indicates that an[IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)was encountered while reading the picture.                                                                                            |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_NETWORK_UNAVAILABLE](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_NETWORK_UNAVAILABLE:kotlin.Int) Indicates that the device is currently not connected to a network that's capable of reaching a carrier's RCS servers.                                                                                                           |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_REMOTE_END_CLOSED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_REMOTE_END_CLOSED:kotlin.Int) Indicates that the phone process died or otherwise became unavailable while uploading the call composer picture.                                                                                                                    |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_UNKNOWN](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_UNKNOWN:kotlin.Int) Indicates that an unknown error was encountered when uploading the call composer picture.                                                                                                                                                               |

|                                                                                                                                                                                             Public constructors                                                                                                                                                                                             ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [CallComposerException](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#CallComposerException(kotlin.Int,%20java.io.IOException))`(`errorCode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `ioException:` `[IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)?`)` <br /> |

|                                                                                                                                                                            Public methods                                                                                                                                                                             ||
|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)               | [getErrorCode](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#getErrorCode())`()` Fetches the error code associated with this exception.                                                                       |
| open[IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)? | [getIOException](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#getIOException())`()` Fetches the[IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)that caused the error. |

## Constants

### ERROR_AUTHENTICATION_FAILED

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

```
static val ERROR_AUTHENTICATION_FAILED: Int
```

Indicates that the device failed to authenticate with the carrier when uploading the picture. Clients that encounter this error should not retry the upload unless a reboot or radio reset has been performed in the interim.  

    Value: 3

### ERROR_FILE_TOO_LARGE

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

```
static val ERROR_FILE_TOO_LARGE: Int
```

Indicates that the file or stream supplied exceeds the size limit defined in[getMaximumCallComposerPictureSize()](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager#getMaximumCallComposerPictureSize()). Clients that encounter this error should retry the upload after reducing the size of the picture.  

    Value: 2

### ERROR_INPUT_CLOSED

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

```
static val ERROR_INPUT_CLOSED: Int
```

Indicates that the[InputStream](https://developer.android.com/reference/kotlin/java/io/InputStream.html#)passed to #uploadCallComposerPicture was closed. The caller should retry if this error is encountered, and be sure to not close the stream before the callback is called this time.  

    Value: 4

### ERROR_IO_EXCEPTION

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

```
static val ERROR_IO_EXCEPTION: Int
```

Indicates that an[IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)was encountered while reading the picture. The offending[IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)will be available via[getIOException()](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#getIOException()). Clients should use the contents of the exception to determine whether a retry is warranted.  

    Value: 5

### ERROR_NETWORK_UNAVAILABLE

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

```
static val ERROR_NETWORK_UNAVAILABLE: Int
```

Indicates that the device is currently not connected to a network that's capable of reaching a carrier's RCS servers. Clients should prompt the user to remedy the issue by moving to an area with better signal, by connecting to a different network, or to retry at another time.  

    Value: 6

### ERROR_REMOTE_END_CLOSED

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

```
static val ERROR_REMOTE_END_CLOSED: Int
```

Indicates that the phone process died or otherwise became unavailable while uploading the call composer picture. Clients that encounter this error should retry the upload.  

    Value: 1

### ERROR_UNKNOWN

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

```
static val ERROR_UNKNOWN: Int
```

Indicates that an unknown error was encountered when uploading the call composer picture. Clients that encounter this error should retry the upload.  

    Value: 0

## Public constructors

### CallComposerException

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

```
CallComposerException(
    errorCode: Int, 
    ioException: IOException?)
```

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ||
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `errorCode`   | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Value is[android.telephony.TelephonyManager.CallComposerException#ERROR_UNKNOWN](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_UNKNOWN:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_REMOTE_END_CLOSED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_REMOTE_END_CLOSED:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_FILE_TOO_LARGE](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_FILE_TOO_LARGE:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_AUTHENTICATION_FAILED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_AUTHENTICATION_FAILED:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_INPUT_CLOSED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_INPUT_CLOSED:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_IO_EXCEPTION](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_IO_EXCEPTION:kotlin.Int), or[android.telephony.TelephonyManager.CallComposerException#ERROR_NETWORK_UNAVAILABLE](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_NETWORK_UNAVAILABLE:kotlin.Int) |
| `ioException` | [IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)?:This value may be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## Public methods

### getErrorCode

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

```
open fun getErrorCode(): Int
```

Fetches the error code associated with this exception.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Return                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ||
|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | An error code. Value is[android.telephony.TelephonyManager.CallComposerException#ERROR_UNKNOWN](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_UNKNOWN:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_REMOTE_END_CLOSED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_REMOTE_END_CLOSED:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_FILE_TOO_LARGE](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_FILE_TOO_LARGE:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_AUTHENTICATION_FAILED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_AUTHENTICATION_FAILED:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_INPUT_CLOSED](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_INPUT_CLOSED:kotlin.Int),[android.telephony.TelephonyManager.CallComposerException#ERROR_IO_EXCEPTION](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_IO_EXCEPTION:kotlin.Int), or[android.telephony.TelephonyManager.CallComposerException#ERROR_NETWORK_UNAVAILABLE](https://developer.android.com/reference/kotlin/android/telephony/TelephonyManager.CallComposerException#ERROR_NETWORK_UNAVAILABLE:kotlin.Int) |

### getIOException

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

```
open fun getIOException(): IOException?
```

Fetches the[IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)that caused the error.

|                                                       Return                                                       ||
|------------------------------------------------------------------------------------------|--------------------------|
| [IOException](https://developer.android.com/reference/kotlin/java/io/IOException.html#)? | This value may be`null`. |