[[["容易理解","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,["# Android emergency number database\n\nAndroid includes an emergency number database that contains a database version\nnumber and a list of emergency phone numbers with emergency service categories\n(for example, police, fire, ambulance) and a corresponding country. This\ndatabase is one of the sources for identifying and providing emergency numbers\nin Android.\n**Figure 1.** Android emergency number database system\n\nAOSP file\n---------\n\nAOSP provides an emergency number database file located in\n`packages/services/Telephony/ecc/output/eccdata`. The content of the database\ncan be read in `packages/services/Telephony/ecc/input/eccdata.txt`.\n\nDownloaded database\n-------------------\n\nFrom Android 11 and higher, Android supports a\ndownloaded emergency number\ndatabase that can be updated through OTA updates. This ensures that devices have\naccess to the latest version of the database and the latest information.\n\nUpdate information\n------------------\n\nTo add or update information in the emergency number database,\nprovide the details of your request by\n[filing a bug in the Networking component](https://issuetracker.google.com/issues/new?component=192634).\n\nIf your request is approved, Android may update the database and you may then\ndownload to devices. Android may also publish the changes to the configured\nemergency number database in AOSP.\n\nImplementation\n--------------\n\n### Implement an emergency number database\n\nTo implement an emergency number database:\n\n1. Construct a text file that follows the emergency number database format: `packages/services/Telephony/ecc/conversion_toolset_v1/proto/protobuf_ecc_data.proto`.\n2. Convert the text file to an emergency number database file using the conversion tool at [`packages/services/Telephony/ecc/README.md`](https://android.googlesource.com/platform/packages/services/Telephony/+/refs/heads/android16-release/ecc/README.md).\n\n### Enable updates\n\nTo enable updates to the downloaded emergency number database, adopt an OTA\nupdate mechanism to trigger the device to download the emergency number database\navailable from your server. Use a partition, such as\n`/data/misc/emergencynumberdb`, to read and write the downloaded emergency\nnumber database in Android.\n\nTo implement the downloaded emergency number database, use the following system\nAPIs:\n\n- [`TelephonyManager.notifyOtaEmergencyNumberDbInstalled`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/telephony/java/android/telephony/TelephonyManager.java#11489)\n- [`ConfigUpdate.ACTION_UPDATE_EMERGENCY_NUMBER_DB`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/core/java/android/os/ConfigUpdate.java#128)\n\nValidation\n----------\n\nTo test your implementation of the downloaded emergency number database, make\nsure the downloaded database is returned as a part of the result of\n[`getEmergencyNumberList`](https://developer.android.com/reference/android/telephony/TelephonyManager#getEmergencyNumberList()),\nand the numbers are identified as emergency numbers when\n[`isEmergencyNumber`](https://developer.android.com/reference/android/telephony/TelephonyManager#isEmergencyNumber(java.lang.String))\nis called."]]