ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
ใช้ข้อความแบบเรียลไทม์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หน้านี้จะอธิบายวิธีใช้ข้อความแบบเรียลไทม์ (RTT) ใน Android 9 RTT เป็นฟีเจอร์สำหรับผู้ใช้ที่หูหนวกหรือได้ยินไม่ชัดซึ่งมาแทนที่เทคโนโลยีเครื่องพิมพ์ดีดระยะไกล (TTY) ฟีเจอร์นี้ช่วยให้อุปกรณ์ใช้หมายเลขโทรศัพท์เดียวกันสำหรับการโทรด้วยเสียงและ RTT, ส่งข้อความพร้อมกันขณะที่พิมพ์ทีละตัวอักษร, รองรับการสื่อสารกับ 911 และใช้งานร่วมกับ TTY ได้
ในการโทรด้วย RTT ทั้งผู้โทรและผู้รับจะมีเครื่องหมายบ่งบอกว่ากำลังโทรด้วย RTT เมื่อเชื่อมต่อแล้ว ทั้ง 2 ฝ่ายจะเข้าสู่การโทรผ่าน RTT ซึ่งจะมีการเปิดใช้งานการป้อนข้อความและแป้นพิมพ์ เมื่อพิมพ์ ข้อความจะปรากฏขึ้นและส่งไปทีละอักขระตามที่คุณพิมพ์
ตัวอย่างและแหล่งที่มา
คอมโพเนนต์เฟรมเวิร์กมีอยู่ใน AOSP ที่ Call.RttCall และ Connection.RttTextStream
คอมโพเนนต์ IMS/โมเด็มเป็นกรรมสิทธิ์และควรจัดหาโดยผู้ให้บริการ IMS/โมเด็ม นอกจากนี้ คุณยังใช้การอ้างอิง RTT ของตัวโทรออกได้ด้วย
รหัส Dialer ของ AOSP สำหรับ RTT
การใช้งาน
หากต้องการใช้ RTT คุณควรทำงานร่วมกับผู้ให้บริการโมเด็ม/SoC เนื่องจากต้องใช้โมเด็มที่รองรับ RTT คุณสามารถอัปเกรดเป็น Android 9 หรือพอร์ตรายการแพตช์เฟรมเวิร์กการรับส่งโทรคมนาคมกลับไปใช้ Android 8.0 ได้ API ที่เพิ่มใน AOSP ของ Android 8.0 จะไม่ทํางาน
ฟีเจอร์นี้ใช้ API สาธารณะใน AOSP ใน android.telecom
และ @SystemApis ใน
android.telephony.ims
UI ทั้งหมดอยู่ใน com.android.phone
และ AOSP
dialer
หากต้องการใช้ RTT ให้นําเข้าโค้ด AOSP และระบุสแต็ก IMS ที่ใช้ @SystemApis ฝั่ง IMS สําหรับ RTT โดยต้องมีสิ่งต่อไปนี้
การปรับแต่ง
คุณเปิดหรือปิดใช้ฟีเจอร์นี้ได้โดยใช้การกําหนดค่าอุปกรณ์ config_support_rtt
ในการวางซ้อนการกําหนดค่าอุปกรณ์สําหรับ packages/services/Telephony
และ Flag การกําหนดค่าผู้ให้บริการ CarrierConfigManager.RTT_SUPPORTED_BOOL
ในไฟล์การกําหนดค่าผู้ให้บริการ
ฟีเจอร์นี้อาจพร้อมใช้งานผ่านการตั้งค่าการช่วยเหลือพิเศษหรือไม่ก็ได้ ทั้งนี้ขึ้นอยู่กับการกำหนดค่า ใช้การกําหนดค่าอุปกรณ์เพื่อเปลี่ยนการตั้งค่าเริ่มต้น โดยค่าเริ่มต้น ฟีเจอร์นี้จะตั้งค่าเป็น "ปิด"
การตรวจสอบความถูกต้อง
หากต้องการตรวจสอบการติดตั้งใช้งาน RTT ให้ทำการทดสอบ CTS และทดสอบ RTT ของโปรแกรมโทร
การทดสอบ CTS
การทดสอบ CTS (android.cts.telecom.RttOperationsTest
) จะครอบคลุมการติดตั้งใช้งานส่วน AOSP คุณต้องทำการทดสอบเองสำหรับส่วนสแต็ก IMS ของการติดตั้งใช้งาน
การทดสอบ RTT ใน Dialer
คำอธิบายสถานการณ์ |
การจำลอง UI |
หากปิดใช้ RTT ในอุปกรณ์ กล่องโต้ตอบเกี่ยวกับ RTT จะปรากฏขึ้น |

|
ในการตั้งค่าแป้นพิมพ์โทรศัพท์ หน้าจอข้อความแบบเรียลไทม์จะอยู่ในการตั้งค่า > การช่วยเหลือพิเศษ ซึ่งมีตัวเลือกให้เลือกโหมด RTT อื่น |

|
เมื่อเปิดใช้ RTT โดยค่าเริ่มต้น
- ขณะโทรออก ระบบจะแสดง UI การโทรระหว่างการโทรแบบมาตรฐาน
- เมื่อเชื่อมต่อการโทรแล้ว มุมมองโหมด RTT จะปรากฏขึ้น หากผู้ใช้ฝั่งที่รับไม่ได้ตั้งค่าเริ่มต้นเป็นโหมด RTT ระบบจะแสดงแบนเนอร์ที่ระบุว่ามีการขอโหมด RTT ขณะรอการตอบกลับ
|

|
หากปิดใช้ RTT ในอุปกรณ์
- หน้าจอสายเรียกเข้าจะแสดงปุ่มรับสายมาตรฐานและป้ายกำกับการโทรมาตรฐาน
|

|
หากเปิดใช้ RTT ในอุปกรณ์และตั้งค่าเริ่มต้นให้รับสายทั้งหมดเป็น RTT
- หน้าจอสายเรียกเข้าจะแสดงพุก RTT และป้ายกำกับการโทรที่เกี่ยวข้อง
- การตอบสายจะโหลดมุมมองโหมด RTT ที่เปิดใช้แป้นพิมพ์
|

|
ใน UI ระหว่างการโทรสำหรับ RTT จะมีตัวเลือกต่างๆ ต่อไปนี้เพื่อให้ผู้ใช้ควบคุมสถานะของการโทรด้วยเสียงและรับความช่วยเหลือทั่วไปเกี่ยวกับการใช้ RTT
- เปิดและปิดไมโครโฟน
- เปิดและปิดลำโพง
- ใช้ปุ่มกดเป็นอินพุต
- เพิ่มการโทรอีกสาย
- เปลี่ยนจากการโทรด้วย RTT เป็นการโทรด้วยเสียง
- สลับการกดค้างไว้เป็นเปิดและปิด
|

|
ในหน้าจอรายละเอียดการโทร การเลือกลิงก์ดูข้อความถอดเสียงจะแสดงมุมมองการสนทนาแบบเต็มพร้อมข้อความทั้งหมดของเซสชัน RTT
การประทับเวลาจะปรากฏขึ้น ผู้ใช้กลับไปที่หน้าจอรายละเอียดการโทรได้โดยใช้ปุ่มย้อนกลับ
|

|
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# Implement real-time text\n\nThis page describes how to implement real-time text (RTT) in Android\n9. RTT is a feature for deaf or hard of hearing users\nthat replaces teletypewriter (TTY) technology. With this feature, devices can\nuse the same phone number for voice and RTT calls, simultaneously transmit text\nas it is being typed on a character-by-character basis, support 911\ncommunications, and provide backward capability with TTY.\n\nIn an RTT call, both the caller and receiver have indications that they are in\nan RTT call. When connected, both sides enter the RTT call where the text input\nand keyboard is activated. When typing, the text appears and is sent as it is\ntyped, character by character.\n\nExamples and source\n-------------------\n\nFramework components are available in AOSP at\n[Call.RttCall](https://developer.android.com/reference/android/telecom/Call.RttCall)\nand\n[Connection.RttTextStream](https://developer.android.com/reference/android/telecom/Connection.RttTextStream).\nIMS/modem components are proprietary and should be supplied by the IMS/modem\nvendor. Dialer RTT reference implementation is also available.\n\nAOSP Dialer code for RTT:\n\n- InCall: [/java/com/android/incallui/rtt](https://android.googlesource.com/platform/packages/apps/Dialer/+/android16-release/java/com/android/incallui/rtt)\n- Call log: [/java/com/android/dialer/rtt](https://android.googlesource.com/platform/packages/apps/Dialer/+/android16-release/java/com/android/dialer/rtt)\n\nImplementation\n--------------\n\nTo implement RTT, you should work with a modem/SoC provider because a modem that\nsupports RTT is required. You can upgrade to Android\n9 or backport a list of telephony framework patches\ninto Android 8.0. APIs added in Android 8.0 AOSP will not work.\n\nThis feature uses public APIs in AOSP in `android.telecom` and @SystemApis in\n`android.telephony.ims`. All UI lies within `com.android.phone` and the AOSP\ndialer.\n\nTo implement RTT, import the AOSP code and supply an IMS stack that implements\nthe IMS-side @SystemApis for RTT. This requires:\n\n- Turning RTT on/off using `ImsConfig#setProvisionedValue(RTT_SETTING_ENABLED)`\n- Indicating RTT status of a call using `ImsStreamMediaProfile#mRttMode`\n- Support for the following methods in `ImsCallSession`:\n\n - `sendRttMessage`\n - `sendRttModifyRequest`\n - `sendRttModifyResponse`\n- Support for calling the following methods in `ImsCallSessionListener`:\n\n - `callSessionRttModifyRequestReceived`\n - `callSessionRttModifyResponseReceived`\n - `callSessionRttMessageReceived`\n\nCustomization\n-------------\n\nYou can enable or disable this feature using the device config,\n`config_support_rtt`, in the device config overlay for\n`packages/services/Telephony`, and the carrier config flag,\n`CarrierConfigManager.RTT_SUPPORTED_BOOL`, in the carrier config files.\nDepending on the configuration, the feature is either available through the\nAccessibility settings or not. Use the device config to change the default\nsettings. By default, the feature is set to Off.\n\nValidation\n----------\n\nTo validate your implementation of RTT, run CTS tests, and perform dialer RTT\ntesting.\n\n### CTS testing\n\nThe CTS tests (`android.cts.telecom.RttOperationsTest`) cover the AOSP portion\nof the implementation. You must provide your own tests for the IMS stack portion\nof the implementation.\n\n### Dialer RTT testing\n\n| **Scenario description** | **UI mock** |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|\n| If RTT is disabled on the device, a dialog about RTT is displayed. | |\n| In Dialer settings, a Real-Time Text screen is available under **Settings \\\u003e Accessibility** that provides an option to choose a different RTT mode. | |\n| 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 doesn't default into RTT mode, a banner indicating that RTT mode has been requested is displayed while waiting for a response. | |\n| If RTT is disabled on the device: - Incoming call screen displays standard answering puck and standard call labels. | |\n| 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. | |\n| 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. - Use keypad as an input. - Add another call. - Switch to a voice call from an RTT call. - Toggle hold on and off. | |\n| In the Call details screen, selecting the See transcript 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. | |"]]