rveachkc / pymsteams

Format messages and post to Microsoft Teams.
https://pypi.org/project/pymsteams/
Apache License 2.0
428 stars 79 forks source link

Adaptive card is not rendered on android phone #140

Open tinex81 opened 2 years ago

tinex81 commented 2 years ago

Dear rveach maintainer,

i would like to submit this issue on android phone that the adaptive card is not rendered well. That is, from android when you click on the buttons (of a potential action) the context menu will appears, such as the calendar or the multi-selection of some values. What does not appear instead is the enter key of the choice you want to make. The pictures perhaps explain better. This is a comparison table, where:

For the image see the follow link: https://i.imgur.com/VvAaH5S.png

The code I am using is the following.

import pymsteams

# You must create the connectorcard object with the Microsoft Webhook URL
myTeamsMessage = pymsteams.connectorcard("MY-CURRENT-WEBHOOK")

# Add text to the message.
myTeamsMessage.text("this is my text")
myTeamsMessage.title("This is my message title")

# create the section
myMessageSection = pymsteams.cardsection()

#Potential Action1
myTeamsPotentialAction1 = pymsteams.potentialaction(_name = "Add a comment")
myTeamsPotentialAction1.addInput("TextInput","comment","Add a comment here",False)
myTeamsPotentialAction1.addAction("HttpPost","Add Comment","https://www.lg.com") 

#Potential Action2
myTeamsPotentialAction2 = pymsteams.potentialaction(_name = "Set due date")
myTeamsPotentialAction2.addInput("DateInput","dueDate","Enter due date")
myTeamsPotentialAction2.addAction("HttpPost","save","https://www.virustotal.com")

#Potential Action3
myTeamsPotentialAction3 = pymsteams.potentialaction(_name = "Change Status")
myTeamsPotentialAction3.choices.addChoices("In progress","0")
myTeamsPotentialAction3.choices.addChoices("Active","1")
myTeamsPotentialAction3.addInput("MultichoiceInput","list","Select a status",False)
myTeamsPotentialAction3.addAction("HttpPost","Save","https://nvd.nist.gov/")

myTeamsMessage.addPotentialAction(myTeamsPotentialAction1)
myTeamsMessage.addPotentialAction(myTeamsPotentialAction2)
myTeamsMessage.addPotentialAction(myTeamsPotentialAction3)

# Summary
myTeamsMessage.summary("Test Message")

# Then send the card
myTeamsMessage.send()

I can confirm that is probably something with the pymsteams and not related to android, as i have other Teams channel where on android , the button on potential action works as expected. May i can link some info about that

Regards

tinex81 commented 2 years ago

Updates: I have tested https://i.imgur.com/VvAaH5S.png with an IOS smartphone, and it works as expected.