自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
技術詳情
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
下圖說明與撥號應用程式互動的系統元件:

圖 1. 與撥號程式互動的元件
-
系統 UI。底部導覽列面向,用於代管註冊 intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end
意圖的「電話」按鈕。這會啟動使用者的主活動 TelecomActivity
。
-
應用程式啟動器。管理整個應用程式清單。撥號程式會使用 android.intent.category.LAUNCHER
宣告 TelecomActivity。從啟動器的應用程式清單中選取電話應用程式,就會顯示 TelecomActivity。
-
主畫面小工具:在 AOSP 參考資料中,沒有 Home 小工具。原始設備製造商 (OEM) 可能會考慮為撥號程式新增主畫面小工具,以便顯示目前已連結手機的狀態 (以及其他資訊)。
-
通知中心
-
來電時會顯示抬頭通知 (HUN)。當撥號程式 InCallServiceImpl
收到來電時,撥號程式會將 HUN 發布至通知中心,顯示電話號碼或聯絡資訊等通話詳細資料。撥號程式也會顯示「接聽」和「拒接」這兩個動作按鈕。輕觸「Answer」按鈕即可接聽來電,InCallServiceImpl
會處理進行中的通話,在通話 UI 中顯示撥號器,並關閉 HUN。點選 HUN 後,系統會以全螢幕顯示「InCall」頁面,並顯示「Answer」和「Reject」按鈕。
-
未讀的未接來電會顯示通知。點選通知會顯示「通話記錄」頁面,並將未接來電標示為已讀。輕觸「回電」按鈕即可撥打電話,並顯示撥號器的 InCall 使用者介面。
-
Google 助理。使用者可以要求 Google 助理撥打電話,這時可能會顯示「撥號」應用程式 InCall 使用者介面。
-
Google 地圖。透過 Google 地圖撥打給商家時,系統會傳送 DIAL 意圖,並附加電話號碼,以便啟動 Dialpad 頁面,快速撥打電話。
-
CarInputService. 監控方向盤上「通話」和「結束通話」按鈕的實體按鍵。按下:
-
在沒有來電時,方向盤上的通話按鈕會傳送 DIAL 意圖,並顯示撥號器的撥號鍵盤頁面。
-
當有來電時,方向盤上的通話按鈕會導致 TelecomManager 接聽來電。
-
當有來電時,使用者透過方向盤上的「結束通話」按鈕,TelecomManager 就會結束通話。
-
藍牙
-
PBAPClient. 從手機下載聯絡人,並寫入聯絡人供應器。系統會為每部連線的手機建立帳戶,並將裝置的藍牙 MAC 位址設為帳戶名稱,將 com.android.bluetooth.pbapsink
(@string/pbap_account_type
在 packages/apps/Bluetooth
中定義) 設為帳戶類型。寫入聯絡人提供者的聯絡人會附上帳戶資訊,並在手機連線中斷時清除。PBAPClient
不會直接與撥號器互動,而是將聯絡資訊寫入聯絡資訊提供者。撥號程式會讀取聯絡人供應程式中的聯絡人資料。
-
HfpClientConnectionService
:透過 HFP 管理藍牙通話,並將通話回報給電信服務。
-
電信。Android 電信架構會管理 Android 裝置上的音訊和視訊通話。由於撥號應用程式是預設的電話應用程式,因此會實作 InCallService
API,而 InCallController
會將撥號應用程式的 InCallService 實作項目繫結至處理通話。詳情請參閱「建立替代電話應用程式」和「成為預設電話應用程式」。
-
系統設定。撥號程式會監控 HFP 已連線裝置清單,並在沒有手機透過藍牙連線至撥號程式時顯示錯誤訊息。在 AOSP 參考資料中,連線至藍牙按鈕會將使用者連結至系統的藍牙設定頁面,以便配對新裝置或連線至已配對的裝置。
-
駕駛人分心等級引擎這項 Android 系統服務會根據車輛的行駛狀態,限制使用者體驗。撥號應用程式必須執行所有 UX 駕駛分心限制。為此,撥號應用程式必須監聽 CarUXRestrictionManager 並實作所有政策。Dialer 必須符合以下規定:
使用者流程
Dialer Main
以下提供撥號應用程式的不同頁面。

圖 2. 主要撥號頁面
通話處理
以下是呼叫處理程序流程:

圖 3. 通話處理
通知
以下列出各種通知頁面:

圖 4. 通知
通話狀態
以下是「InCall」頁面流程:

圖 5. 通話頁面
搜尋
搜尋顯示選項如下:

圖 6. 搜尋
設定
設定選項如下:

圖 7. 設定
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Technical details\n\nThe following diagram illustrates the system components that interact with Dialer:\n\n**Figure 1.** Components that interact with Dialer\n\n- **System UI.** Lower navigation facet to host the Phone button, which\n registers the `intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end` intent.\n This starts the user's main activity, `TelecomActivity`.\n\n- **App Launcher.** Manages the entire app list. Dialer declares\n TelecomActivity with `android.intent.category.LAUNCHER`. Selecting the phone app from\n the launcher's app list displays TelecomActivity.\n\n- **Home widget.** In AOSP reference, there is no Home widget. OEMs might want to\n consider adding a Home widget for Dialer to display the state of the current connected phone (as\n well as other information).\n\n- **Notification Center**\n\n - **Heads Up Notification (HUN) is displayed for incoming calls.** When the Dialer\n `InCallServiceImpl` receives an incoming call, Dialer posts a HUN to the\n Notification center, which shows the call details, such as phone number or contact info.\n Dialer also displays two action buttons, Answer and Decline. By tapping Answer button,\n the call is answered and `InCallServiceImpl` handles the active call to show\n Dialer's in call UI and dismisses the HUN. Clicking on the HUN displays the fullscreen\n InCall page with the Answer and Reject buttons.\n\n - **Notification appears for unread missed calls.** Clicking on the\n notification displays the Call History page and marks missed calls as read. Tapping the\n Call Back button places a call and displays the Dialer's InCall user interface.\n\n- **Assistant.** Users can ask an assistant to make a call that may display the\n Dialer InCall user interface.\n\n- **Google Maps.**Calling a merchant from Google Maps sends the DIAL\n intent with extras of phone numbers which will start Dialpad page for quick dialing.\n\n- **CarInputService.**Monitors the physical key of the Call and End Call\n buttons on the steering wheel. Pressing the:\n\n - Call button from the steering wheel when there is no incoming call sends the DIAL\n intent and displays the Dialpad page of Dialer.\n\n - Call button from the steering wheel when there is an incoming call causes the\n TelecomManager to answer the call.\n\n - End Call button from the steering wheel when there is an incoming call, the\n TelecomManager ends the call.\n\n- **Bluetooth**\n\n - **PBAPClient.** Downloads contacts from a phone and writes to the\n contacts provider. For each phone connected, an account is created with the device's\n Bluetooth MAC address as the account name and `com.android.bluetooth.pbapsink`\n (`@string/pbap_account_type` defined in `packages/apps/Bluetooth`) as\n the account type. Contacts written to the contacts provider are written with the account\n information and are cleared when the phone is disconnected. `PBAPClient` doesn't\n interact directly with Dialer but instead writes contacts to the Contacts Provider. Dialer\n reads the contacts from the Contacts Provider.\n\n - **`HfpClientConnectionService`.** Manages the Bluetooth call\n through HFP and reports the call to the Telecom services.\n\n- **Telecom.** The Android Telecom framework manages audio and video calls on an\n Android device. Since Dialer is the default phone app, it implements the\n [InCallService](https://developer.android.com/reference/android/telecom/InCallService.html)\n APIs and `InCallController` will bind the Dialer's InCallService implementation to\n handle calls. For more details, see\n [Create\n a replacement phone app](https://developer.android.com/guide/topics/connectivity/telecom#replacePhoneApp) and\n [Becoming\n the Default Phone App](https://developer.android.com/reference/android/telecom/InCallService.html#becoming-the-default-phone-app).\n\n- **System Settings.** Dialer monitors the HFP-connected device list and displays\n an error message when no phones are connected to dialer through Bluetooth. In the AOSP\n reference, the Connect to Bluetooth button links users to the system Bluetooth Settings\n page to pair a new device or to connect to a paired device.\n\n- **Driver Distraction Engine.** This Android system service imposes UX\n restrictions based on the driving state of the car. Dialer must execute all UX driving\n distraction restrictions.To do so, Dialer must listen to the\n [CarUXRestrictionManager](https://developer.android.com/reference/android/car/drivingstate/CarUxRestrictionsManager)\n and implement all policies. Dialer must:\n\n - Connect to the [Car](https://developer.android.com/reference/android/car/Car)\n library and obtain an instance of\n [CarUXRestrictionManager](https://developer.android.com/reference/android/car/drivingstate/CarUxRestrictionsManager).\n\n - Subscribe to updates in the list of\n [CarUxRestrictions](https://developer.android.com/reference/android/car/drivingstate/CarUxRestrictions)\n and implement them as documented.\n\n - Of particular importance to Dialer:\n\n - **Settings page is vehicle-optimized.** User could not access the\n Dialer Settings page when driving. By tapping on the Settings menu from the action bar,\n a blocking screen is displayed to prevent the user from accessing Settings while\n driving. If the Settings page is already displayed, the blocking screen will pop up to\n stop the user interaction.\n\n - **System settings cannot be accessed while driving.** On the Error page,\n when no Bluetooth devices are connected, a Connect to Bluetooth button displays the\n system Bluetooth settings page. The UXR of this button is fully restricted.\n While driving, clicking on this button displays an error message to inform the\n user to park the car first and then perform the action.\n\n - **User cannot start the add-to-favorite flow while driving.** The Add a\n Favorite button is disabled.\n\nUser flows\n----------\n\n### Dialer Main\n\nThe different pages for Dialer are provided below.\n\n**Figure 2.** Main Dialer page\n\n### Call handling\n\nThe call handing process flow is presented below:\n\n**Figure 3.** Call handling\n\n### Notifications\n\nThe different notifications pages are displayed below:\n\n**Figure 4.** Notifications\n\n### InCall status\n\nThe InCall page flow is shown below:\n\n**Figure 5.** InCall page\n\n### Search\n\nThe Search displays are:\n\n**Figure 6.** Search\n\n### Settings\n\nThe Settings options are:\n\n**Figure 7.** Settings"]]