自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
緊急電話號碼和緊急電話撥號
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
緊急電話是裝置的基本功能,也是關鍵功能,因為它必須為 Android 使用者提供服務,同時滿足全球各大電信業者和法規要求。Android 架構可為使用者提供快速安全的緊急電話服務體驗。
Android 10 使用 SIM 卡、網路、數據機和資料庫中的詳細緊急電話號碼清單,改善本機 Android 平台的緊急電話功能、維護和更新支援功能。Android 10 也支援根據緊急救援服務類型 (例如警察、消防隊或救護車) 撥打緊急電話。Android 10 透過 TelephonyManager API 分享多個訂閱項目的緊急電話號碼,進一步強化對多 SIM 卡裝置的支援。
在搭載 Radio HAL 1.4 的 Android 10 中,我們在 HAL 介面中將緊急電話與一般電話分開,以便改善緊急電話路徑,並讓裝置撥打 Android 資料庫中設定的適當緊急電話號碼。
實作
如要實作緊急電話和緊急電話號碼功能,請實作下列 TelephonyManager
和硬體介面 API。
TelephonyManager API
實作下列 API:
緊急電話號碼來源的值如下:
EMERGENCY_NUMBER_SOURCE_NETWORK_SIGNALING
:數字來自網路訊號
EMERGENCY_NUMBER_SOURCE_SIM
:號碼來自 SIM 卡
EMERGENCY_NUMBER_SOURCE_DATABASE
:數字來自平台維護的資料庫
EMERGENCY_NUMBER_SOURCE_MODEM_CONFIG
:這個數字來自數據機設定
EMERGENCY_NUMBER_SOURCE_DEFAULT
:預設可使用數字。112 和 911 號碼必須隨時可用。在沒有 SIM 卡的情況下,必須提供 000、08、110、999、118 和 119 的值。詳情請參閱 3GPP TS 22.101 中的「第 10 節:緊急電話」。
緊急服務類別的值如下:
UNSPECIFIED
:一般緊急電話,所有類別
POLICE
:警察
AMBULANCE
:救護車
FIRE_BRIGADE
:消防隊
MARINE_GUARD
:Marine Guard
MOUNTAIN_RESCUE
:山區救援
MIEC
:手動啟動 eCall (MIeC)
AIEC
:自動啟動 eCall (AIeC)
詳情請參閱 3GPP TS 22.101 中的「第 10 節:緊急電話」。
硬體介面 API
在 IRadio.hal
中實作 emergencyDial
。在 IRadioResponse.hal
中實作 emergencyDialResponse
,以便傳送包含回應類型、序號和錯誤資訊的回應。
如要回報目前的緊急電話號碼清單,請在 IRadioIndication.hal
中實作 currentEmergencyNumberList
。在 types.hal
中實作 EmergencyNumber
,其中包含緊急電話號碼的相關資訊,包括號碼地址、行動裝置國家/地區代碼 (MCC)、行動裝置網路代碼 (MNC)、緊急服務類別、緊急電話號碼來源 (URN) 和緊急電話號碼來源。
如要指出緊急電話的處理方式,請使用 EmergencyCallRouting
。您可以視需要使用緊急路由或一般通話路由功能,要求撥打緊急電話。如果是 UNKNOWN
,則會根據實作方式決定路由。
驗證
如要驗證導入方式,請執行下列 CTS 和 VTS 測試。
CTS 測試
VTS 測試
參考資料
如要進一步瞭解相關技術規格和標準,請參閱:
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[[["容易理解","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-26 (世界標準時間)。"],[],[],null,["# Emergency numbers and emergency calling\n\nEmergency calling is fundamental and critical for devices because they must work\nfor Android users while satisfying various carrier and regulatory requirements\nall over the world. The Android framework provides users with a fast and safe\nemergency calling experience.\n\nAndroid 10 provides improved support for emergency call\nfunctions, maintenance, and updates in the local Android platform by using a\ndetailed emergency number list from the SIM, network, modem, and database.\nAndroid 10 also supports emergency calling based on the type of emergency\nservices such as police, fire, or ambulance. Android 10 provides\nimproved support for multi-SIM\ndevices by sharing emergency numbers from multiple subscriptions in\nthe TelephonyManager API.\n\nIn Android 10 with Radio HAL 1.4, emergency calling is\nimproved by separating emergency calls from normal calls in the HAL interface\nto optimize the emergency calling path and allowing devices to dial the\nappropriate emergency number configured in the Android database.\n\nImplementation\n--------------\n\nTo implement the emergency calling and emergency number functions, implement\nthe following\n[`TelephonyManager`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/telephony/java/android/telephony/TelephonyManager.java)\nand hardware interface APIs.\n\n### TelephonyManager APIs\n\nImplement the following APIs:\n\n- Implement [`getEmergencyNumberList`](https://developer.android.com/reference/android/telephony/TelephonyManager.html#getEmergencyNumberList()) to get valid emergency numbers for emergency calling based on the emergency number source including the locale, SIM cards, default, modem, Android database, and network. For each emergency number, specify the corresponding emergency service category such as police, ambulance, and fire.\n- Implement [`isEmergencyNumber`](https://developer.android.com/reference/android/telephony/TelephonyManager.html#isEmergencyNumber(java.lang.String)) to identify whether a phone number is an emergency number.\n- Implement [`isPotentialEmergencyNumber`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/telephony/java/android/telephony/TelephonyManager.java#10554) to identify a number as an emergency number if it has the same starting digits as any of the emergency numbers.\n\nThe values for emergency number sources are:\n\n- `EMERGENCY_NUMBER_SOURCE_NETWORK_SIGNALING`: Number is from the network signal\n- `EMERGENCY_NUMBER_SOURCE_SIM`: Number is from the SIM card\n- `EMERGENCY_NUMBER_SOURCE_DATABASE`: Number is from the platform-maintained database\n- `EMERGENCY_NUMBER_SOURCE_MODEM_CONFIG`: Number is from the modem configuration\n- `EMERGENCY_NUMBER_SOURCE_DEFAULT`: Number is available by default. The numbers 112 and 911 must always be available. 000, 08, 110, 999, 118, and 119 must be available when no SIM is present. For more details, see *Section 10: Emergency Calls* in [3GPP TS 22.101](https://www.etsi.org/deliver/etsi_ts/122100_122199/122101/09.01.00_60/ts_122101v090100p.pdf).\n\nThe values for emergency service categories are:\n\n- `UNSPECIFIED`: General emergency call, all categories\n- `POLICE`: Police\n- `AMBULANCE`: Ambulance\n- `FIRE_BRIGADE`: Fire brigade\n- `MARINE_GUARD`: Marine Guard\n- `MOUNTAIN_RESCUE`: Mountain Rescue\n- `MIEC`: Manually Initiated eCall (MIeC)\n- `AIEC`: Automatically Initiated eCall (AIeC)\n\nFor more details, see *Section 10: Emergency Calls* in\n[3GPP TS 22.101](https://www.etsi.org/deliver/etsi_ts/122100_122199/122101/09.01.00_60/ts_122101v090100p.pdf).\n\n### Hardware interface APIs\n\nImplement\n[`emergencyDial`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/IRadio.hal#159)\nin `IRadio.hal`. Implement\n[`emergencyDialResponse`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/IRadioResponse.hal#55)\nin `IRadioResponse.hal` to send a response with response type, serial number,\nand error information.\n\nTo report the current list of emergency numbers, implement\n[`currentEmergencyNumberList`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/IRadioIndication.hal#52)\nin `IRadioIndication.hal`. Implement\n[`EmergencyNumber`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/types.hal#99)\nin `types.hal`, which contains information about the emergency number including\nthe number address, the mobile country code (MCC), mobile network code (MNC),\n[emergency service category](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/types.hal#145),\nemergency uniform resource name (URN), and\n[emergency number source](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/types.hal#170).\n\nTo indicate how an emergency call is handled, use\n[`EmergencyCallRouting`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/types.hal#194).\nAn emergency call can be requested using emergency routing or normal call\nrouting as required. If this is `UNKNOWN`, routing is decided based on the\nimplementation.\n\nValidation\n----------\n\nTo validate your implementation, run the following CTS and VTS tests.\n\n### CTS tests\n\n- [`testGetEmergencyNumberList`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java#1235)\n- [`testIsEmergencyNumber`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java#1277)\n- [`testIsPotentialEmergencyNumber`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java#1304)\n\n### VTS tests\n\n- [`emergencyDial`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/vts/functional/radio_hidl_hal_api.cpp#24)\n- [`emergencyDial_withServices`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/vts/functional/radio_hidl_hal_api.cpp#49)\n- [`emergencyDial_withEmergencyRouting`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.4/vts/functional/radio_hidl_hal_api.cpp#75)\n\nReferences\n----------\n\nFor additional information on related technical specifications and standards,\nsee:\n\n- [3GPP TS 22.101](https://www.etsi.org/deliver/etsi_ts/122100_122199/122101/09.01.00_60/ts_122101v090100p.pdf), *Section 10: Emergency Calls*\n- [3GPP TS 24.008](https://www.etsi.org/deliver/etsi_ts/124000_124099/124008/07.15.00_60/ts_124008v071500p.pdf), *Section 9.2.13.4: Emergency Number List*\n- [3GPP TS 23.167](https://www.etsi.org/deliver/etsi_ts/123100_123199/123167/15.04.00_60/ts_123167v150400p.pdf), *Section 6: Functional description*\n- [3GPP TS 24.503](https://www.etsi.org/deliver/etsi_ts/124500_124599/124503/08.22.00_60/ts_124503v082200p.pdf), *Section 5.1.6.8.1: General*\n- [RFC 5031](https://tools.ietf.org/html/rfc5031): *A Uniform\n Resource Name (URN) for Emergency and Other Well-Known Services*"]]