我正在尝试与actions.intent.RECORD_HEALTH_OBSERVATION
集成以跟踪应用程序中的重量。一切似乎都可以通过App Actions测试工具(v3.2.0)正常运行,但是当我尝试通过与Google Assistant通话进行测试时,实际重量值(例如180)不存在-所有其他参数均按预期显示。
我的actions.xml
:
<actions>
<action intentName="actions.intent.RECORD_HEALTH_OBSERVATION">
<fulfillment urlTemplate="myapp://track-weight?referrer=assistant{&weightValue,weightUnits}">
<parameter-mapping
intentParameter="healthObservation.value.value"
urlParameter="weightValue" />
<parameter-mapping
intentParameter="healthObservation.value.unitText"
urlParameter="weightUnits" />
</fulfillment>
</action>
</actions>
测试工具显示:
{
"@context": "http://schema.googleapis.com",
"@type": "HealthObservation",
"value": {
"@type": "QuantitativeValue",
"unitText": "Kilogram",
"value": "83"
}
同样,当通过App Actions测试工具/ adb进行测试时,weightValue
和weightUnits
均显示预期值,但是当您说“ Ok Google,请记录一下我用我的App称重180公斤”,然后< [仅 weightUnits
出现在查询字符串中。