microsoft / AdaptiveCards-Mobile

MIT License
8 stars 13 forks source link

[Rendering] calling-Code in Action.OpenUrl doesn't work #117

Closed dborchers-gc closed 1 day ago

dborchers-gc commented 3 months ago

Target Platforms

iOS, Android, Other

SDK Version

1.5

Application Name

Microsoft Teams/ Viva Connections

Problem Description

The Action.OpenUrl doesn't work with calling-links

image

Screenshots

No response

Card JSON

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.5",
    "__comment": "Elements used",
    "body": [
        {
            "type": "Container"
        },
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "items": [
                        {
                            "type": "Image",
                            "url": "https://****",
                            "spacing": "None"
                        }
                    ],
                    "width": 50
                },
                {
                    "type": "Column",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "IT-Services",
                            "wrap": true,
                            "size": "Large",
                            "weight": "Bolder",
                            "horizontalAlignment": "Left",
                            "spacing": "Medium"
                        }
                    ],
                    "horizontalAlignment": "Center",
                    "width": 50,
                    "spacing": "None",
                    "verticalContentAlignment": "Center"
                }
            ],
            "horizontalAlignment": "Center"
        },
        {
            "type": "Container",
            "selectAction": {
                "type": "Action.ToggleVisibility",
                "title": "q1",
                "targetElements": [
                    "a1",
                    "chevron_up1",
                    "chevron_down1"
                ]
            },
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "wrap": true,
                                    "text": "Wie erreiche ich den IT-Support?",
                                    "weight": "Bolder",
                                    "spacing": "Large",
                                    "separator": true,
                                    "size": "Medium"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": "28px",
                            "verticalContentAlignment": "Center",
                            "items": [
                                {
                                    "type": "Image",
                                    "url": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/faq-accordion/assets/ico-up.png",
                                    "width": "20px",
                                    "height": "20px",
                                    "id": "chevron_up1"
                                },
                                {
                                    "type": "Image",
                                    "url": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/faq-accordion/assets/ico-down.png",
                                    "id": "chevron_down1",
                                    "width": "20px",
                                    "height": "20px",
                                    "isVisible": false
                                }
                            ]
                        }
                    ]
                }
            ],
            "verticalContentAlignment": "Center",
            "minHeight": "30px",
            "spacing": "Large",
            "style": "emphasis"
        },
        {
            "type": "Container",
            "id": "a1",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "8px"
                        },
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Der IT-Service (Team ServiceDesk und der Field-Service) ist über folgende Kanäle erreichbar:",
                                    "wrap": true,
                                    "spacing": "Padding",
                                    "size": "Medium",
                                    "fontType": "Default",
                                    "style": "default",
                                    "weight": "Default",
                                    "isSubtle": false
                                },
                                {
                                    "type": "ColumnSet",
                                    "columns": [
                                        {
                                            "type": "Column",
                                            "width": "stretch",
                                            "items": [
                                                {
                                                    "type": "ColumnSet",
                                                    "columns": [
                                                        {
                                                            "type": "Column",
                                                            "width": 15,
                                                            "items": [
                                                                {
                                                                    "type": "Image",
                                                                    "horizontalAlignment": "Center",
                                                                    "url": "https://*****",
                                                                    "width": "30px",
                                                                    "spacing": "None"
                                                                }
                                                            ],
                                                            "spacing": "None"
                                                        },
                                                        {
                                                            "type": "Column",
                                                            "width": 85,
                                                            "items": [
                                                                {
                                                                    "type": "TextBlock",
                                                                    "text": "it-servicedesk@gc-gruppe.de",
                                                                    "wrap": true,
                                                                    "horizontalAlignment": "Left",
                                                                    "weight": "Bolder",
                                                                    "size": "Medium"
                                                                }
                                                            ],
                                                            "verticalContentAlignment": "Center"
                                                        }
                                                    ],
                                                    "spacing": "None"
                                                }
                                            ],
                                            "style": "emphasis",
                                            "selectAction": {
                                                "type": "Action.OpenUrl",
                                                "url": "mailto:it****",
                                                "title": "E-Mail an den IT-ServiceDesk"
                                            }
                                        }
                                    ],
                                    "spacing": "Medium"
                                },
                                {
                                    "type": "ColumnSet",
                                    "columns": [
                                        {
                                            "type": "Column",
                                            "width": "stretch",
                                            "items": [
                                                {
                                                    "type": "ColumnSet",
                                                    "columns": [
                                                        {
                                                            "type": "Column",
                                                            "width": 15,
                                                            "items": [
                                                                {
                                                                    "type": "Image",
                                                                    "horizontalAlignment": "Center",
                                                                    "url": "https://****",
                                                                    "width": "30px",
                                                                    "spacing": "None"
                                                                }
                                                            ],
                                                            "spacing": "None"
                                                        },
                                                        {
                                                            "type": "Column",
                                                            "width": 85,
                                                            "items": [
                                                                {
                                                                    "type": "TextBlock",
                                                                    "text": "+49 421 2029-333",
                                                                    "wrap": true,
                                                                    "horizontalAlignment": "Left",
                                                                    "weight": "Bolder",
                                                                    "size": "Medium"
                                                                }
                                                            ],
                                                            "verticalContentAlignment": "Center"
                                                        }
                                                    ],
                                                    "spacing": "None"
                                                }
                                            ],
                                            "style": "emphasis",
                                            "selectAction": {
                                                "type": "Action.OpenUrl",
                                                "url": "tel:0421123456",
                                                "title": "IT-ServiceDesk anrufen"
                                            },
                                            "spacing": "None",
                                            "rtl": false
                                        }
                                    ],
                                    "spacing": "Medium"
                                },
                                {
                                    "type": "ColumnSet",
                                    "columns": [
                                        {
                                            "type": "Column",
                                            "width": "stretch",
                                            "items": [
                                                {
                                                    "type": "ColumnSet",
                                                    "columns": [
                                                        {
                                                            "type": "Column",
                                                            "width": 15,
                                                            "items": [
                                                                {
                                                                    "type": "Image",
                                                                    "horizontalAlignment": "Center",
                                                                    "url": "https://*****",
                                                                    "width": "30px",
                                                                    "spacing": "None"
                                                                }
                                                            ],
                                                            "spacing": "None"
                                                        },
                                                        {
                                                            "type": "Column",
                                                            "width": 85,
                                                            "items": [
                                                                {
                                                                    "type": "TextBlock",
                                                                    "text": "Ticketsystem (Jira)",
                                                                    "wrap": true,
                                                                    "horizontalAlignment": "Left",
                                                                    "weight": "Bolder",
                                                                    "size": "Medium"
                                                                }
                                                            ],
                                                            "verticalContentAlignment": "Center"
                                                        }
                                                    ],
                                                    "spacing": "None"
                                                }
                                            ],
                                            "style": "emphasis",
                                            "selectAction": {
                                                "type": "Action.OpenUrl",
                                                "url": "https://****",
                                                "title": "Jira öffnen"
                                            },
                                            "spacing": "None",
                                            "rtl": false
                                        }
                                    ],
                                    "spacing": "Medium"
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "Container",
                    "spacing": "None",
                    "minHeight": "24px"
                }
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Was ist der Unterschied zwischen dem ServiceDesk und dem Field-Service?",
                                    "wrap": true,
                                    "separator": true,
                                    "spacing": "Large",
                                    "weight": "Bolder",
                                    "size": "Medium"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": "28px",
                            "items": [
                                {
                                    "type": "Image",
                                    "url": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/faq-accordion/assets/ico-up.png",
                                    "width": "20px",
                                    "height": "20px",
                                    "id": "chevron_up2",
                                    "isVisible": false
                                },
                                {
                                    "type": "Image",
                                    "url": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/faq-accordion/assets/ico-down.png",
                                    "id": "chevron_down2",
                                    "width": "20px",
                                    "height": "20px"
                                }
                            ]
                        }
                    ]
                }
            ],
            "style": "emphasis",
            "spacing": "Small",
            "selectAction": {
                "type": "Action.ToggleVisibility",
                "title": "q2",
                "targetElements": [
                    "a2",
                    "chevron_up2",
                    "chevron_down2"
                ]
            },
            "isVisible": false
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "8px"
                        },
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Microsoft 365 includes everything you know in Office 365. Microsoft 365 is designed to help people and businesses achieve more with innovative Office apps, intelligent cloud services, and world-class security.",
                                    "wrap": true,
                                    "spacing": "Medium"
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "Container",
                    "minHeight": "24px"
                }
            ],
            "isVisible": false,
            "id": "a2"
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Wo finde ich weitere Hilfe und Informationen?",
                                    "wrap": true,
                                    "spacing": "Large",
                                    "separator": true,
                                    "weight": "Bolder",
                                    "size": "Medium"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": "28px",
                            "items": [
                                {
                                    "type": "Image",
                                    "url": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/faq-accordion/assets/ico-up.png",
                                    "width": "20px",
                                    "height": "20px",
                                    "id": "chevron_up3",
                                    "isVisible": false
                                },
                                {
                                    "type": "Image",
                                    "url": "https://raw.githubusercontent.com/pnp/AdaptiveCards-Templates/main/samples/faq-accordion/assets/ico-down.png",
                                    "id": "chevron_down3",
                                    "width": "20px",
                                    "height": "20px"
                                }
                            ],
                            "verticalContentAlignment": "Center"
                        }
                    ]
                }
            ],
            "style": "emphasis",
            "spacing": "Small",
            "selectAction": {
                "type": "Action.ToggleVisibility",
                "title": "q3",
                "targetElements": [
                    "a3",
                    "chevron_up3",
                    "chevron_down3"
                ]
            }
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "8px"
                        },
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Auf diesen Seiten finden Sie weitere Hilfe zu diversen Themen.",
                                    "wrap": true,
                                    "spacing": "Padding",
                                    "size": "Medium"
                                },
                                {
                                    "type": "ColumnSet",
                                    "columns": [
                                        {
                                            "type": "Column",
                                            "width": "stretch",
                                            "items": [
                                                {
                                                    "type": "Image",
                                                    "horizontalAlignment": "Center",
                                                    "url": "https://****",
                                                    "width": "64px",
                                                    "height": "64px"
                                                },
                                                {
                                                    "type": "TextBlock",
                                                    "text": "Holding SharePoint",
                                                    "wrap": true,
                                                    "horizontalAlignment": "Center",
                                                    "weight": "Bolder"
                                                }
                                            ],
                                            "style": "emphasis",
                                            "selectAction": {
                                                "type": "Action.OpenUrl",
                                                "url": "https://*****",
                                                "title": "Learn more"
                                            }
                                        },
                                        {
                                            "type": "Column",
                                            "width": "stretch",
                                            "items": [
                                                {
                                                    "type": "Image",
                                                    "url": "https://*****",
                                                    "width": "64px",
                                                    "height": "64px",
                                                    "horizontalAlignment": "Center"
                                                },
                                                {
                                                    "type": "TextBlock",
                                                    "text": "IT-SharePoint",
                                                    "wrap": true,
                                                    "horizontalAlignment": "Center",
                                                    "weight": "Bolder"
                                                }
                                            ],
                                            "style": "emphasis",
                                            "selectAction": {
                                                "type": "Action.OpenUrl",
                                                "url": "https://*****",
                                                "title": "Learn more"
                                            }
                                        }
                                    ],
                                    "spacing": "Medium"
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "Container",
                    "minHeight": "24px"
                }
            ],
            "id": "a3",
            "isVisible": false
        }
    ]
}

Sample Code Language

No response

Sample Code

No response

dborchers-gc commented 3 months ago

When i use it in Viva Connections Desktop App (In Teams) i got this error too (maybe it helps)

image

ardlank commented 1 day ago

Action.OpenUrl does not support phone numbers: https://adaptivecards.io/explorer/Action.OpenUrl.html