# Call.RttCall

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/telecom/Call.RttCall#constants)\|[Methods](https://developer.android.com/reference/android/telecom/Call.RttCall#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/telecom/Call.RttCall#inhmethods)  

# Call.RttCall

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/telecom/Call.RttCall "View this page in Kotlin")\|Java

`
public
static
final

class
Call.RttCall
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telecom.Call.RttCall |

<br />

*** ** * ** ***

A class that holds the state that describes the state of the RTT channel to the remote party, if it is active.

## Summary

|                                                                                                      ### Constants                                                                                                       ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [RTT_MODE_FULL](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_FULL) Indicates that there should be a bidirectional audio stream between the two parties on the call.              |
| `int` | [RTT_MODE_HCO](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_HCO) Indicates that the local user should be able to hear the audio stream from the remote user, but not vice versa. |
| `int` | [RTT_MODE_VCO](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_VCO) Indicates that the remote user should be able to hear the audio stream from the local user, but not vice versa. |

|                                                                                                                                                        ### Public methods                                                                                                                                                         ||
|-----------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`                                                                | ` `[getRttAudioMode](https://developer.android.com/reference/android/telecom/Call.RttCall#getRttAudioMode())`() ` Returns the current RTT audio mode.                                                                                                      |
| ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[read](https://developer.android.com/reference/android/telecom/Call.RttCall#read())`() ` Reads a string from the remote user, blocking if there is no data available.                                                                                   |
| ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[readImmediately](https://developer.android.com/reference/android/telecom/Call.RttCall#readImmediately())`() ` Non-blocking version of[read()](https://developer.android.com/reference/android/telecom/Call.RttCall#read()).                            |
| ` void`                                                               | ` `[setRttMode](https://developer.android.com/reference/android/telecom/Call.RttCall#setRttMode(int))`(int mode) ` Sets the RTT audio mode.                                                                                                                |
| ` void`                                                               | ` `[write](https://developer.android.com/reference/android/telecom/Call.RttCall#write(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` input) ` Writes the string into the outgoing text stream for this RTT call. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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

### RTT_MODE_FULL

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

```
public static final int RTT_MODE_FULL
```

Indicates that there should be a bidirectional audio stream between the two parties on the call.

<br />

Constant Value: 1 (0x00000001)  

### RTT_MODE_HCO

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

```
public static final int RTT_MODE_HCO
```

Indicates that the local user should be able to hear the audio stream from the remote user, but not vice versa. Equivalent to muting the microphone.

<br />

Constant Value: 2 (0x00000002)  

### RTT_MODE_VCO

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

```
public static final int RTT_MODE_VCO
```

Indicates that the remote user should be able to hear the audio stream from the local user, but not vice versa. Equivalent to setting the volume to zero.

<br />

Constant Value: 3 (0x00000003)

## Public methods

### getRttAudioMode

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

```
public int getRttAudioMode ()
```

Returns the current RTT audio mode.

<br />

|                                                                                                                                                                         Returns                                                                                                                                                                         ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | Current RTT audio mode. One of[RTT_MODE_FULL](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_FULL),[RTT_MODE_VCO](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_VCO), or[RTT_MODE_HCO](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_HCO). <br /> |

### read

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

```
public String read ()
```

Reads a string from the remote user, blocking if there is no data available. Returns`null`if the RTT conversation has been terminated and there is no further data to read. This method is not thread-safe -- calling it from multiple threads simultaneously may lead to interleaved text.

<br />

|                                                                                                       Returns                                                                                                        ||
|--------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | A string containing text sent by the remote user, or`null`if the conversation has been terminated or if there was an error while reading. <br /> |

### readImmediately

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

```
public String readImmediately ()
```

Non-blocking version of[read()](https://developer.android.com/reference/android/telecom/Call.RttCall#read()). Returns`null`if there is nothing to be read.

<br />

|                                                                                    Returns                                                                                     ||
|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | A string containing text entered by the user, or`null`if the user has not entered any new text yet. <br /> |

|                                    Throws                                     ||
|----------------------------------------------------------------------------|---|
| [IOException](https://developer.android.com/reference/java/io/IOException) |   |

### setRttMode

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

```
public void setRttMode (int mode)
```

Sets the RTT audio mode. The requested mode change will be communicated through[Callback.onRttModeChanged(Call, int)](https://developer.android.com/reference/android/telecom/Call.Callback#onRttModeChanged(android.telecom.Call,%20int)).

<br />

|                                                                                                                                                                                                                                                                                                                                                              Parameters                                                                                                                                                                                                                                                                                                                                                               ||
|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `mode` | `int`: The desired RTT audio mode, one of[RTT_MODE_FULL](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_FULL),[RTT_MODE_VCO](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_VCO), or[RTT_MODE_HCO](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_HCO). Value is android.telecom.Call.RttCall.RTT_MODE_INVALID,[RTT_MODE_FULL](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_FULL),[RTT_MODE_HCO](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_HCO), or[RTT_MODE_VCO](https://developer.android.com/reference/android/telecom/Call.RttCall#RTT_MODE_VCO) <br /> |

### write

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

```
public void write (String input)
```

Writes the string into the outgoing text stream for this RTT call. Since RTT transmits text in real-time, this method should be called once for each user action. For example, when the user enters text as discrete characters using the keyboard, this method should be called once for each character. However, if the user enters text by pasting or autocomplete, the entire contents of the pasted or autocompleted text should be sent in one call to this method. This method is not thread-safe -- calling it from multiple threads simultaneously may lead to interleaved text.

<br />

|                                    Throws                                     ||
|----------------------------------------------------------------------------|---|
| [IOException](https://developer.android.com/reference/java/io/IOException) |   |