智能显示屏
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
智能显示屏可将具有视觉吸引力的设备带入用户的家居环境。创建具有丰富视觉效果的 Action,让用户在家高效办公或畅享娱乐内容,成为用户的日常生活的一部分。
为智能显示屏构建丰富响应
Actions on Google 提供针对智能显示屏进行了优化的丰富响应。您可以使用如下组件为 Action 构建视觉互动:
此外,您还可以创建自定义主题,以便更深入地自定义 Action 的外观和风格。
模态
即使设备具有显示屏,也请记住,用户的主要模态是语音优先。请务必专门设计您的丰富响应,以支持语音调用。
如需检测智能显示屏上的屏幕和输入模式是否可用,您可以使用以下代码:
- 带有屏幕:
if (conv.screen)
- 使用语音模式:
if (conv.input.type === 'VOICE')
- 使用触摸模式:
if (conv.input.type === 'TOUCH')
- 使用键盘模态:
if (conv.input.type === 'KEYBOARD')
提示和最佳做法
试试以下操作
试用此示例
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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"]],["最后更新时间 (UTC):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."]]],[]]