對話動作已於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
智慧螢幕
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
智慧螢幕能夠將以視覺為重的裝置展示給使用者家中。您可以建立動作並搭配豐富的視覺元素,在使用者的日常生活或娛樂中提供協助,藉此融入使用者的日常活動。
為智慧螢幕建構內容豐富的回應
Actions on Google 可針對智慧螢幕進行最佳化的複合式回應。您可以使用以下元件為動作建構視覺互動:
此外,您也可以建立自訂主題,進一步自訂動作的外觀和風格。
形式
即使裝置有螢幕,也別忘了使用者的主要形式是語音優先。請務必專門設計豐富的回應,以便支援語音叫用功能。
您可以使用以下程式碼,在智慧螢幕上偵測螢幕的可用性和輸入形態:
- 有螢幕:
if (conv.screen)
- 使用語態:
if (conv.input.type === 'VOICE')
- 使用觸控式:
if (conv.input.type === 'TOUCH')
- 使用鍵盤形態:
if (conv.input.type === 'KEYBOARD')
提示和最佳做法
試試下列動作
試用此範例
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-02 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2023-12-02 (世界標準時間)。"],[[["Smart Displays are visual-forward devices used in homes, and developers can create Actions for in-home productivity or entertainment with rich visuals."],["Actions on Google offers rich responses such as basic cards, lists, carousels, and more, that are optimized for Smart Displays, allowing for visual interactions."],["While Smart Displays have screens, the primary user modality is voice, so rich responses should be designed with voice invocation in mind."],["Developers should leverage rich responses and theme customization to enhance the visual experience and consider the user's home environment when designing their Action."],["Media responses are ideal for Actions involving media playback, but developers should ensure their Action requires media playback support and remember that web linking from Smart Displays is currently not supported."]]],[]]