Google上的操作 - 您对用户的回复是否可以将文字或图片发送到Google Home应用?

时间:2017-04-09 04:05:30

标签: alexa-skills-kit actions-on-google

具体来说,Alexa Skills Kit中是否存在等效的the capability described here,你可以在你的技能回复中发送一张卡片?

3 个答案:

答案 0 :(得分:1)

截至2017/04我很确定无法发送卡片。

Card feature和API.AI中未指明此类功能,{{3}}不可用。

使用displayText,您可以区分语音和显示的文本,但这并不是所谓的富信息,您可以在其中添加图像,按钮,标题等。

但是,我100%肯定会很快添加此功能。

答案 1 :(得分:0)

是的,Alexa支持在Alexa应用中显示卡片作为其响应的一部分。你如何做到这取决于你正在使用哪个Alexa框架或SDK,但它并不困难。 例如,我使用的是alexa-app框架,我只想添加这样的内容:

response.card({
  type: "Standard",
  title: "My Cool Card", // this is not required for type Simple or Standard 
  text: "Your ride is on the way to 123 Main Street!\nEstimated cost for this ride: $25",
  image: { // image is optional 
    smallImageUrl: "https://carfu.com/resources/card-images/race-car-small.png", // required 
    largeImageUrl: "https://carfu.com/resources/card-images/race-car-large.png"
  }
});

答案 2 :(得分:0)