【发布时间】:2019-11-25 11:44:05
【问题描述】:
我正在尝试将谷歌助手集成到我的健身应用程序中,这样当用户说“在 xyz 应用程序上开始我的锻炼”时,我的应用程序就会启动。我在这里观看了视频: https://developers.google.com/actions/app/
并将其添加到我的清单中:
<meta-data android:name="com.google.android.actions"
android:resource="@xml/actions"/>
然后将这些详细信息添加到我的 actions.xml 文件中:
<?xml version="1.0" encoding="utf-8"?>
<actions>
<action intentName="actions.intent.START_EXERCISE">
<fulfillment urlTemplate="https://xyz.in{?exercise}">
<parameter-mapping
intentParameter = "exercise.name"
urlParameter = "exercise"
/>
</fulfillment>
</action>
</actions>
仍然没有得到想要的结果。我在这里做错了什么。
【问题讨论】:
-
此功能处于开发者预览阶段。
-
是的,但它可用于开发。如 IO/19 中所述
-
您能否详细说明发生了什么问题?
-
在添加文档和 IO 视频中提到的上述详细信息后,它应该可以工作了。在助手说“开始我的锻炼”之后,它提供了 Fit 和 strava 应用程序的选项,但不是我的应用程序。那么我在这里做错了什么?
-
@ParthAnjaria 我建议您先试用示例应用程序并使其正常工作(它也使用健身意图):github.com/actions-on-google/appactions-fitness-kotlin
标签: android google-assistant-sdk app-actions