The Wayback Machine - https://web.archive.org/web/20170804032548/https://developer.android.google.cn/reference/android/telecom/Call.RttCall.html
Skip to content

Most visited

Recently visited

navigation

Call.RttCall

public static final class Call.RttCall
extends Object

java.lang.Object
   ↳ android.telecom.Call.RttCall


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

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

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.

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.

Public methods

int getRttAudioMode()

Returns the current RTT audio mode.

String read()

Reads a string from the remote user, blocking if there is no data available.

void setRttMode(int mode)

Sets the RTT audio mode.

void write(String input)

Writes the string into the outgoing text stream for this RTT call.

Inherited methods

Image From class java.lang.Object

Constants

RTT_MODE_FULL

added in API level 26
int RTT_MODE_FULL

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

Constant Value: 1 (0x00000001)

RTT_MODE_HCO

added in API level 26
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.

Constant Value: 2 (0x00000002)

RTT_MODE_VCO

added in API level 26
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.

Constant Value: 3 (0x00000003)

Public methods

getRttAudioMode

added in API level 26
int getRttAudioMode ()

Returns the current RTT audio mode.

Returns
int Current RTT audio mode. One of RTT_MODE_FULL, RTT_MODE_VCO, or RTT_MODE_HCO.

read

added in API level 26
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.

Returns
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.

setRttMode

added in API level 26
void setRttMode (int mode)

Sets the RTT audio mode. The requested mode change will be communicated through onRttModeChanged(Call, int).

Parameters
mode int: The desired RTT audio mode, one of RTT_MODE_FULL, RTT_MODE_VCO, or RTT_MODE_HCO.

write

added in API level 26
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 character the user enters into the device. This method is not thread-safe -- calling it from multiple threads simultaneously may lead to interleaved text.

Throws
IOException
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.