利用与应用有关的 Action 拓展应用
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
利用与应用有关的 Action 将应用扩展到 Google 助理,可以让用户通过向 Google 助理发出语音指令快速与应用的关键功能互动。实现与应用有关的 Action 后,可以利用它通过以下发展功能来提高应用的用户留存率和互动度:
系统快捷指令建议。借助 Google Shortcuts Integration 库,Google 助理可以向用户建议您的动态快捷指令。此功能可让用户轻松发现和重放应用关键功能的快捷指令。
应用内快捷指令建议。借助应用内宣传 SDK,您可以轻松向应用的用户建议 Google 助理快捷指令。用户可以通过向 Google 助理发出语音指令启动这些快捷指令,并在 Google 平台上看到建议的这些快捷指令。
启用系统快捷指令建议
请按照将动态快捷指令推送给 Google 助理中的说明,将 Google Shortcuts Integration 库添加到 Android 项目中,并将动态快捷指令推送给 Google 助理。
以下最佳实践可尽可能提高用户接触与应用有关的 Action 所绑定快捷指令的次数:
在用户完成相关操作时推送快捷指令,以帮助 Google 助理等 Google 平台向用户建议快捷指令。您可以利用 Google Shortcuts Integration 库推送任意数量的快捷指令。
在 shortcuts.xml
中定义静态快捷指令,以便 Google 助理主动向用户建议。这些快捷指令只能通过向 Google Play 管理中心发布应用的新版本进行更新,因此它们最适合推荐适用于所有用户的快捷指令,例如“发送电子邮件”。
静态快捷指令有助于 Google 助理向新用户建议应用快捷指令,因为新用户还未在您的应用中执行过具有动态快捷指令的操作。
创建应用内快捷指令建议
借助应用内宣传 SDK,您可以在应用中建议 Google 助理快捷指令。例如,如果用户在您的音乐应用中搜索“heavy metal workout”,您就可以建议用户将来使用 Google 助理快捷指令直接转到这些搜索结果。然后,用户就可以通过向 Google 助理发出指令“Hey Google, Example App heavy metal workout”来启动该快捷指令。
可以考虑在以下情况下建议快捷指令:当用户初次使用您的应用时,或者当用户执行您希望其将来通过 Google 助理快速重放的操作时。
如需详细了解如何为应用构建建议,请参阅实现建议。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Grow your app with App Actions\n\nExtending your app to Assistant with App Actions lets users quickly engage\nwith the key features of your app by talking to Google Assistant. Once you\nimplement App Actions, you can use it to drive user retention and engagement\nfor your app with the following features:\n\n- **System shortcut suggestions**. The Google Shortcuts Integration library\n lets Google Assistant suggest your dynamic shortcuts to users. This\n capability makes it simple for users to discover and replay shortcuts to your\n app's key features.\n\n- **In-app shortcut suggestions** . The [In-App Promo SDK](/guide/app-actions/in-app-promo-sdk) lets you\n easily suggest Assistant shortcuts to users in your app. Users can launch\n these shortcuts using their voice with Assistant and see them suggested on\n Google surfaces.\n\nEnable system shortcut suggestions\n----------------------------------\n\nTo add the Google Shortcuts Integration library to your Android project and\npush dynamic shortcuts to Assistant, follow the instructions at [Push dynamic\nshortcuts to Assistant](/guide/app-actions/dynamic-shortcuts).\n\nThese best practices maximize user exposure to your App Actions bound shortcuts:\n\n- Push a shortcut whenever a user completes a relevant action to help Google\n surfaces, like Assistant, suggest the shortcut to the user. You can push an\n unlimited number of shortcuts with the Google Shortcuts Integration library.\n\n- Define static shortcuts in `shortcuts.xml` for Assistant to suggest\n proactively to users. These shortcuts can only update by releasing\n a new version of your app to Google Play Console, so they are best for\n suggesting shortcuts that apply to all users, for example, \"Send an email.\"\n\n Static shortcuts are useful for helping Assistant suggest app shortcuts to\n new users who have not yet taken actions in your app that have dynamic\n shortcuts.\n\nCreate in-app shortcut suggestions\n----------------------------------\n\nThe In-App Promo SDK lets you suggest Assistant shortcuts in your app.\nFor example, if a user performs a search for \"heavy metal workout\" in your music\napp, you might suggest an Assistant shortcut directly to those search results\nin the future. The user can then launch the shortcut by asking Assistant, *\"Hey\nGoogle, Example App heavy metal workout.\"*\n\nConsider suggesting shortcuts during user onboarding or when a user performs an\naction you want them to quickly replay in the future with Assistant.\n\nFor more information about building suggestions for your app, see\n[Implement suggestions](/guide/app-actions/in-app-promo-sdk#implement_suggestions)."]]