RttTextStream
class RttTextStream
kotlin.Any | |
↳ | android.telecom.Connection.RttTextStream |
Provides methods to read and write RTT data to/from the in-call app.
Summary
Public methods | |
---|---|
String! |
read() Reads a string from the in-call app, blocking if there is no data available. |
String! |
Non-blocking version of |
Unit |
Writes the string {@param input} into the text stream to the UI for this RTT call. |
Public methods
read
fun read(): String!
Reads a string from the in-call app, 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.
Return | |
---|---|
String! |
A string containing text entered by the user, or null if the conversation has been terminated or if there was an error while reading. |
readImmediately
fun readImmediately(): String!
Non-blocking version of read()
. Returns null
if there is nothing to be read.
Return | |
---|---|
String! |
A string containing text entered by the user, or null if the user has not entered any new text yet. |
write
fun write(input: String!): Unit
Writes the string {@param input} into the text stream to the UI for this RTT call. Since RTT transmits text in real-time, this method should be called as often as text snippets are received from the remote user, even if it is only one character.
This method is not thread-safe -- calling it from multiple threads simultaneously may lead to interleaved text.
Parameters | |
---|---|
input |
String!: The message to send to the in-call app. |