-api-id | -api-type | -api-device-family-note |
---|---|---|
M:Windows.ApplicationModel.Chat.ChatMessageManager.ShowComposeSmsMessageAsync(Windows.ApplicationModel.Chat.ChatMessage) |
winrt method |
xbox |
Shows the compose SMS dialog, pre-populated with data from the supplied ChatMessage object, allowing the user to send an SMS message.
The chat message.
An asynchronous action.
The TransportId property of the message is set to the desired outgoing transport. The ChatMessage.Body property is optionally set to any initial text. The following example shows a call to ShowComposeSmsMessageAsync with the transport and initial text for a message:
async void ComposeMessage()
{
ChatMessage message;
message.Body = "Sent from *SpiffyChat*: How’s your morning going?";
message.TransportId = "0";
message.Recipients.Add("+12065551234");
await ChatMessageManager.ShowComposeSmsMessageAsync(message);
}
chatSystem, smsSend, chat