【发布时间】:2018-01-10 13:37:07
【问题描述】:
在 Actions on Google 文档中,我读到您可以通过使用带有权限请求 (link) 的“帮助”语法来询问用户的电话号码 (link)。但这对我不起作用,模拟器停止并告诉我我的 Google 操作无法正常工作。根据文档,我的回复如下所示:
{
"conversationToken": "TOKEN",
"expectUserResponse": true,
"expectedInputs": [
{
"inputPrompt": {
"initialPrompts": [
{
"textToSpeech": "PLACEHOLDER_FOR_PERMISSION"
}
],
"noInputPrompts": []
},
"possibleIntents": [
{
"intent": "actions.intent.PERMISSION",
"inputValueData": {
"@type": "type.googleapis.com/google.actions.v2.PermissionValueSpec",
"optContext": "To deliver your order",
"permissions": [
"PHONE_NUMBER"
]
}
}
]
}
]
}
我在这里做错了吗?
【问题讨论】:
-
您是否对事件“actions.intent.PERMISSION”有处理响应的意图?
-
是的,我有。例如,在上一步中,我要求用户的设备位置可以正常工作。助理会要求用户授予此权限,但在 PHONE_NUMBER 权限下,助理甚至不会要求用户授予电话号码的权限。
标签: user-permissions actions-on-google