question

newuser-0995cf51-3391-42a9-ad2d-7ccd33f027c2 avatar image

How to add simple card in custom skill under development?

alexa skills kitalexa voice servicealexa
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Rokas avatar image
Rokas answered

Standard card:

SDK v2 example. Just add .withStandardCard()to the response:

return responseBuilder
      .withStandardCard(title, content, smallImageUrl, largeImageUrl)
      .getResponse()

SDK v1 example. Add .cardRenderer() to the response

this.response.cardRenderer(title, content, image)

Image object looks like this:

image: {
      smallImageUrl: 'url',
      largeImageUrl: 'url',
    }

Other arguments are just strings.

Simple card:

SDK v2:

return responseBuilder
      .withSimpleCard(title, content)
      .getResponse()

SDK v1:

this.response.cardRenderer(title, content)
2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@RokasV

but sir I am asking about simple card as a response not about standard card

0 Likes 0 ·
Rokas avatar image Rokas newuser-0995cf51-3391-42a9-ad2d-7ccd33f027c2 ·

I edited my answer. Added instructions on how to add a simple card too

0 Likes 0 ·