在我的流程中,有三个处理程序:
actions.intent.PERMISSION
,询问用户他的确切位置。在两个yes
和no
回复的处理程序中,json响应相同。
{
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Store near: Address Number City.\n Now: OPEN."
}
},
{
"carouselBrowse": {
"items": [
{
"title": "title 0",
"openUrlAction": {
"url": "https://website.it/?0"
},
"description": "description",
"image": {
"url": "https://avatars3.githubusercontent.com/u/5048136?s=460&v=4",
"accessibilityText": "empty"
}
},
{
"title": "title 1",
"openUrlAction": {
"url": "https://website.it/?1"
},
"description": "description",
"image": {
"url": "https://avatars3.githubusercontent.com/u/5048136?s=460&v=4",
"accessibilityText": "empty"
}
},
{
"title": "title 2",
"openUrlAction": {
"url": "https://website.it/?2"
},
"description": "description",
"image": {
"url": "https://avatars3.githubusercontent.com/u/5048136?s=460&v=4",
"accessibilityText": "empty"
}
}
]
}
}
]
},
"userStorage": "{\"lat\":45.4627124, \"long\": 9.1076928}"
}
},
"outputContexts": [
{
"name": "projects/project-name/agent/sessions/ABppEePAPYRhvT9Pcwmu3S61Ka12DUN5gmem7v0p/contexts/context-name",
"lifespanCount": 1,
"parameters": {
"Data": ""
}
}
],
"followupEventInput": {
"parameters": {
"data": {
"listSelect": {}
}
}
}
}
问题
当我回答“否”时,BrowseCarousel起作用。当我回答“是”时,BrowseCarousel不起作用。
我找不到原因。 json的响应在两个不同的意图上是完全相同的。
答案 0 :(得分:0)
问题解决了。
答案是:对于此特定事件,模拟器已损坏。使用真实设备时,浏览轮播可以正常工作。
使用真实设备,如果您想准确查看其效果如何。