图片setSmallSourceUrl已弃用?

时间:2017-07-16 23:49:58

标签: alexa-skills-kit

要将图像添加到StandardCard卡,我设置

图片图片=新图片();

图片来自com.amazon.speech.ui。各种博客然后说要使用 image.setSmallSourceUrl和image.setLargeSourceUrl用于设置图像的URL,但这两种方法似乎已在alexa-skills-kit-1.4.0中弃用。

此外,似乎有两个(不兼容的)Image类正在播放中。一个在com.amazon.speech.ui.Image中,另一个在com.amazon.speech.speechlet.interfaces.display.element.Image中。

1)将两个图像添加到StandardCard的正确方法是什么? 2)StandardCard想要哪两种图像类型?

1 个答案:

答案 0 :(得分:0)

下面显示了响应的格式,



{
  "version": "1.0",
  "response": {
    "outputSpeech": {"type":"PlainText","text":"output speech"},
    "card": {
      "type": "Standard",
      "title": "Title",
      "text": "sample test",
      "image": {
        "smallImageUrl": "YourSmallImage here",
        "largeImageUrl": "YourLarge image here"
      }
    }
  }




您可以使用以下格式提供图像:

JPEG
PNG

smallImageUrl建议大小为720w x 480h(以像素为单位),largeImageUrl建议大小为1200w x 800h(以像素为单位)