We've been using Botbuilder.js version 4 to send adaptive cards into Teams for our bot. This seems to work for Web, Desktop and even Android Teams. When we do the same thing for iOS it is not working. Has anyone dealt with this before?
var response = MessageFactory.Text(string.Empty);
response.Attachments.Add(cardAttachment);
response.Summary = "showing custom greeeting from the Bot - rather than a card";
await turnContext.SendActivityAsync(response, cancellationToken);
Android Push Notification - has summary text
iOS Push Notification - missing summary text
This is the same Summary text for the same adaptive card. Appreciate any ideas!!
Related
We have a Microsoft Teams project running on a Node server using botbuilder v4.14.0, among other things. This project sends adaptive cards to Microsoft Teams users in a direct message, and for each adaptive card we set a summary text for the purpose of rendering in the push notification the end user receives.
Something along the lines of this suggestion, we set the message summary field:
var response = MessageFactory.Text(string.Empty);
response.Attachments.Add(cardAttachment);
response.Summary = "Hello custom notification";
await turnContext.SendActivityAsync(response, cancellationToken);
The problem we have is that sometimes this appears correctly in the push notification, but other times it appears entirely blank. What's more, the name of the app is different in the push notification - for notifications with the correct summary, the name of the app is pulled from our Azure Application Service metadata, but when the summary is missing the name is somehow pulled from the Teams app manifest file.
Example of different notifications
In both cases, the payloads are normal adaptive cards, delivered exactly through the same code. We explored any differences we could find between the two different adaptive cards and found nothing meaningful. One just worked while the other just didn't.
Digging in further, we found that by modifying the size of the payload, we could make an adaptive card that failed to render a notification start working. To make an adaptive card render the summary field in the push notification, we added additional text until a threshold was exceeded.
For instance, measured in bytes, we found that one particular adaptive card would start to render the summary field after 1888 bytes, but would not render the summary at 1887 bytes. However, another adaptive card, structurally different than the first example, would render the summary at 1781 bytes, but not at 1780.
Why does the summary start rendering at one payload size vs a smaller one? Why is the payload size inconsistent between the two payloads? Why are the names different? So many opaque questions.
Ultimately, how do we send adaptive cards so that they always render the summary in the push notification?
Edit: In testing, it appears that push notification summaries appear correctly for Teams Web, Desktop, and Android notifications. They do not work consistently for Teams iOS notifications.
I'm quite new to bot framework, we are working on a MS teams app in which i'm using a adaptive card. On that card i'm having buttons for MS teams call and chat. So how to implement a call and chat button for a dynamic users selected from message extension list.
I'm completely new to bot framework
Chat - Please take a look at Deeplink to chat documentation. Use openURL action and specify the URL in value field.
Calling - Currently, there is no Deeplink to initiate a call. Option would be use Calls and online meetings bots.
i wanted to show azure's chat bots responses as notifications in the notification bar like PUSH notifications.
I've came across that i need to use xamarin webview to integrate bot in Android app. So, can webview capable of showing chat responses as push notifications ?
Note:-
I'm using Bot Framework SDK V4
and .Net Core
Xamarin for cross platform development
The WebChat control (webview in your questions) is used as a UX display control within your app. Messages from your bot to your app goes through a dedicated channel that has nothing to do with a mobile Push Notification. So in short, the answer to your question is no, this functionality is currently not supported by the client Webview control (WebChat).
With that said, you can create a custom middleware component for your bot that can send a Push Notification message using Azure Notification Hub. Or you can create custom functionality (sample showing a standard web app) in your bot that sends a push notification. Or your bot can drop a message to a queue and have an Azure Function pick the queue message and send the push notification. Note the last option is an implementation detail.
Does anyone know if adaptive cards render correctly on slack channel? I have cards than I confirmed works on the Microsoft bot emulator and webchat, but only one line of text appears in slack.
AdaptiveCards are not supported on slack. They have their own json layout called BlockKit.
I have created a chatbot using the Microsoft Bot Framework. The only channel I'm interested in right now it's Facebook. When doing some tests on Facebook I've noticed that when I click on the "Like" button, and when I send an gif or audio message, the bot crashes with the following message:
"Value cannot be null. Parameter name: stringToEscape."
How can I handle this kind of message within my bot? I can't replicate this on the emulator, so I don't know what Facebook is sending to my bot when the user sends one of these kind of messages. I would like to just ignore them and avoid the bot crashing.