Google is committed to advancing racial equity for Black communities. See how.

Implementing Real-Time Text

This page describes how to implement Real-Time Text (RTT) in Android 9. RTT is a feature for deaf or hard of hearing users that replaces Text Telephone (TTY) technology. With this feature, devices can use the same phone number for voice and RTT calls, simultaneously transmit text as it is being typed on a character-by-character basis, support 911 communications, and provide backward capability with TTY.

In an RTT call, both the caller and receiver have indications that they are in an RTT call. When connected, both sides enter the RTT call where the text input and keyboard is activated. When typing, the text appears and is sent as it is typed, character by character.

Examples and source

Framework components are available in AOSP at Call.RttCall and Connection.RttTextStream. IMS/modem components are proprietary and should be supplied by the IMS/modem vendor. Dialer RTT reference implementation is also available.

AOSP Dialer code for RTT:

Implementation

To implement RTT, you should work with a modem/SoC provider because a modem that supports RTT is required. You can upgrade to Android 9 or backport a list of telephony framework patches into Android 8.0. APIs added in Android 8.0 AOSP will not work.

This feature uses public APIs in AOSP in android.telecom and @SystemApis in android.telephony.ims. All UI lies within com.android.phone and the AOSP dialer.

To implement RTT, import the AOSP code and supply an IMS stack that implements the IMS-side @SystemApis for RTT. This requires:

  • Turning RTT on/off via ImsConfig#setProvisionedValue(RTT_SETTING_ENABLED)
  • Indicating RTT status of a call via ImsStreamMediaProfile#mRttMode
  • Support for the following methods in ImsCallSession:

    • sendRttMessage
    • sendRttModifyRequest
    • sendRttModifyResponse
  • Support for calling the following methods in ImsCallSessionListener:

    • callSessionRttModifyRequestReceived
    • callSessionRttModifyResponseReceived
    • callSessionRttMessageReceived

Customization

You can enable or disable this feature using the device config, config_support_rtt, in the device config overlay for packages/services/Telephony, and the carrier config flag, CarrierConfigManager.RTT_SUPPORTED_BOOL, in the carrier config files. Depending on the configuration, the feature is either available via the Accessibility settings or not. Use the device config to change the default settings. By default, the feature is set to Off.

Validation

To validate your implementation of RTT, run CTS tests, and perform dialer RTT testing.

CTS testing

The CTS tests (android.cts.telecom.RttOperationsTest) cover the AOSP portion of the implementation. You must provide your own tests for the IMS stack portion of the implementation.

Dialer RTT testing

Scenario description UI mock

If RTT is disabled on the device, a banner about RTT is displayed. A "Learn more" option that directs to the Google Help Center article page with more information on RTT is displayed.

Banner call is displayed.

RTT banner

In Dialer settings, a "Real-Time Text" screen is available under Settings > Accessibility that provides an option to enable "RTT mode". Descriptive text is displayed to explain the mode: "Send and receive text messages instead of speaking and listening during a call".

RTT accessibility

When RTT is enabled by default,
  • While the call is placed, the standard in-call dialing UI is displayed.
  • Upon call connection, the RTT mode view is displayed. If the receiving user does not default into RTT mode, a banner indicating that RTT mode has been requested is displayed while waiting for a response.

RTT in-call UI

If RTT is disabled on the device:
  • Incoming call screen displays standard answering puck and standard call labels.

RTT standard call UI

If RTT is enabled on the device and has the default set to answer all calls as RTT:
  • Incoming call screen displays RTT puck and associated call labels.
  • Answering the call loads the RTT mode view with keyboard enabled.

RTT mode view

In the in-call UI for RTT, options are provided to allow users to control the state of the voice call and get general help on using RTT.
  • Toggle microphone on and off.
  • Toggle speaker on and off.
  • Route audio to external audio devices if available.

RTT in-call UI options

In the "Call details" screen, a snippet of the RTT conversation history is displayed.
  • Snippet does not exceed one line in length. If the RTT session did not include any conversation content, a notice is displayed indicating no content was stored.
  • Snippet includes RTT icon to indicate an RTT call.
  • Selecting the "See all" link displays a full conversation view with the full text of the RTT session. Timestamps are displayed. The user can return to the Call details screen using the Back button.

RTT call details