BotBuilder-Samples icon indicating copy to clipboard operation
BotBuilder-Samples copied to clipboard

MS Teams adaptive card “heroCard” not work on mobile

Open Krukovich opened this issue 5 years ago • 1 comments

I`m creating bot for MS Teams and using JS Microsoft Bot Framework V4 SDK. In my work, I use search message extension and to work with it, I implemented the onSelectItem method that returns a adaptive card. I will give an example of the code below.

    return Promise.resolve({
      type: "result",
      attachmentLayout: "list",
      attachments: [CardFactory.heroCard(
        `${file.name}`,
        `${text}`,
        undefined,
        CardFactory.actions([
          {
            type: "openUrl",
            title: "Open",
            value: `${openLink}`
          },
          {
            type: "openUrl",
            title: "Download",
            value: `${downloadLink}`
          },
        ]),
      )]
    });

Where I pass undefined, this should be the path to the picture, but in my implementation I don't need it. So and this code works great in the browser and on the desktop version here is a screenshot

https://ibb.co/jhcN8HV

however, on the mobile version, I get the following result

https://ibb.co/Vt9GfpD

this is absolutely not the right card, it has no content or buttons

Krukovich avatar Mar 19 '21 23:03 Krukovich

Closing as a duplicate of https://stackoverflow.com/questions/66716626/ms-teams-adaptive-card-herocard-not-work-on-mobile

jwiley84 avatar Mar 21 '21 03:03 jwiley84