问题描述
我正在尝试通过应用操作将我的 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 (将#修改为@)