如何解决带有 Google 助手和自定义 inetent 名称的 Android 应用
我正在尝试通过应用操作将我的 Android 应用扩展到 Google 助理。
当我使用应用操作测试工具时,它适用于 actions.intent.[ACTION_NAME] 和我的自定义意图名称。
但是,当我向 Google 助理说出或输入一些请求时,它不起作用。
尝试过 start running in Fit Actions
和 adjust desk to 42 centimeters
,但没有用
actions.xml
<actions>
<action intentName="actions.intent.START_EXERCISE">
<fulfillment urlTemplate="https://fit-actions.firebaseapp.com/start{?exerciseType}">
<parameter-mapping
intentParameter="exercise.name"
urlParameter="exerciseType" />
</fulfillment>
<parameter name="exercise.name">
<entity-set-reference entitySetId="ExerciseEntitySet" />
</parameter>
</action>
<!-- Define an inline inventory -->
<!-- This sample maps supported entities with the class FitActivity.Type -->
<entity-set entitySetId="ExerciseEntitySet">
<entity
name="@string/activity_running"
identifier="RUNNING" />
<entity
name="@string/activity_walking"
identifier="WALKING" />
<entity
name="@string/activity_hiking"
identifier="WALKING" />
<entity
name="@string/activity_cycling"
identifier="CYCLING" />
</entity-set>
<action intentName="flh.action.intent.MOVE_POSITION" queryPatterns="@array/HeightQueries">
<parameter name="height" type="https://schema.org/Number" />
<fulfillment
urlTemplate="https://fit-actions.firebaseapp.com/{?move_to_height}">
<parameter-mapping
intentParameter="height"
urlParameter="move_to_height" />
</fulfillment>
</action>
</actions>
<string-array name="HeightQueries">
<item>adjust desk to $height centimeters</item>
<item>adjust desk to $height inches</item>
</string-array>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。