简体   繁体   English

自适应卡未在 Teams 移动应用上呈现

[英]Adaptive card is not rendered on Teams mobile app

We have an external bot configured to use MS Teams channel using message end point web hook.我们有一个外部机器人,配置为使用消息端点 Web 挂钩使用 MS Teams 通道。 The following is the message posted to the Ms Teams channel by the external bot.以下是外部机器人发布到 Ms Teams 频道的消息。 This response gets rendered as expected when MS Teams is accessed via web browser or MS Teams application on desktop computer.当通过 Web 浏览器或台式计算机上的 MS Teams 应用程序访问 MS Teams 时,此响应会按预期呈现。 However, the card is not rendered (seeing an empty line/block without any content) when used with Teams application on an android mobile phone.但是,在 Android 手机上与 Teams 应用程序一起使用时,不会呈现卡片(看到没有任何内容的空行/块)。 Would like to know what is going wrong here?Is this feature not supported on mobile?想知道这里出了什么问题?移动设备不支持此功能吗? or are we missing something?或者我们错过了什么?

   "channelData":{ 
      "tenant":{ 
         "id":"xxxxxxxxxxxxxx"
      }
   },
   "attachments":[ 
      { 
         "contentType":"application/vnd.microsoft.card.adaptive",
         "content":{ 
            "fallbackText":"Adaptive card version not supported",
            "type":"AdaptiveCards",
            "body":[ 
               { 
                  "text":"Here is an adaptive card with a link to a task module",
                  "type":"TextBlock"
               },
               { 
                  "type":"Image",
                  "url":"http://adaptivecards.io/content/cats/1.png"
               }
            ],
            "version":"1.0",
            "actions":[ 
               { 
                  "type":"Action.OpenUrl",
                  "title":"Open Link",
                  "url":"https://teams.microsoft.com/l/task/xxxxx?url=https%3A%2F%2Fwww.wikipedia.com%0A&height=large&width=large&title=Wikipedia-Embed"
               }
            ]
         }
      }
   ],
   "replyToId":"xxxxxx",
   "serviceUrl":"https://smba.trafficmanager.net/amer/",
   "recipient":{ 
      "name":"xxxx xxxx",
      "aadObjectId":"xxxxx",
      "id":"xx:xxxxxxxx"
   },
   "localTimestamp":"2020-02-14T15:21:41.1360000-08:00",
   "channelType":"msteams",
   "from":{ 
      "name":"xxxxxx",
      "id":"xx:xxxxx"
   },
   "type":"message",
   "conversation":{ 
      "conversationType":"personal",
      "tenantId":"xxxxxx",
      "id":"x:xxxxxx"
   }
}```

You need to make sure the card's "type" is "AdaptiveCard" and not "AdaptiveCards" .您需要确保卡的“类型”是"AdaptiveCard"而不是"AdaptiveCards"

 { 
    "fallbackText":"Adaptive card version not supported",
    "type":"AdaptiveCard",
    "body":[ 
       { 
          "text":"Here is an adaptive card with a link to a task module",
          "type":"TextBlock"
       },
       { 
          "type":"Image",
          "url":"http://adaptivecards.io/content/cats/1.png"
       }
    ],
    "version":"1.0",
    "actions":[ 
       { 
          "type":"Action.OpenUrl",
          "title":"Open Link",
          "url":"https://teams.microsoft.com/l/task/xxxxx?url=https%3A%2F%2Fwww.wikipedia.com%0A&height=large&width=large&title=Wikipedia-Embed"
       }
    ]
 }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft Teams Android 应用程序中的自适应卡片文本溢出 - Adaptive Card text overflow in Microsoft Teams Android app 如何在适用于 iOS 和 Android 的 Outlook Mobile 应用程序中启用显示从 Microsoft Flow 发送的自定义自适应卡片? - How to enable showing a custom adaptive card sent from Microsoft Flow in Outlook Mobile app for iOS and Android? 自适应卡中的项目数量是否有限制,以便它在 Android 的 Outlook Mobile 中呈现? - Is there a limit on the number of items in an Adaptive Card so that it renders in Outlook Mobile for Android? 自适应卡片中的人员选取器自适应元素在 Teams Android 应用中不起作用 - People Picker adaptive element in adaptive cards doesn't work in Teams Android app Appcelerator Titanium是否在经典移动应用程序中支持自适应图标? - Does Appcelerator Titanium support Adaptive Icons in classic mobile app? 是否可以将移动应用程序写入micro sd卡? - Is it possible to write a mobile app into micro sd card? 带有NFC的GSM手机的SIM卡上的应用程序,可连接到Android应用程序 - App on the SIM card of a GSM mobile with NFC to connect to Android app 贝宝移动SDKS(自适应付款) - PayPal Mobile SDKS (Adaptive Payments) 从选项卡到聊天频道的 MS Teams 链接仅在移动应用上请求授权 - MS Teams Links from Tab to Chat Channels request authorization only on Mobile App 如何创建自适应Android应用 - How to create an adaptive Android app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM