ChatMessageManager.ShowComposeSmsMessageAsync(ChatMessage) ChatMessageManager.ShowComposeSmsMessageAsync(ChatMessage) ChatMessageManager.ShowComposeSmsMessageAsync(ChatMessage) ChatMessageManager.ShowComposeSmsMessageAsync(ChatMessage) ChatMessageManager.ShowComposeSmsMessageAsync(ChatMessage) Method

Definition

Shows the compose SMS dialog, pre-populated with data from the supplied ChatMessage object, allowing the user to send an SMS message.

public : static IAsyncAction ShowComposeSmsMessageAsync(ChatMessage message)
static IAsyncAction ShowComposeSmsMessageAsync(ChatMessage message) const;
public static IAsyncAction ShowComposeSmsMessageAsync(ChatMessage message)
Public Shared Function ShowComposeSmsMessageAsync(message As ChatMessage) As IAsyncAction
Windows.ApplicationModel.Chat.ChatMessageManager.showComposeSmsMessageAsync(message).done( /* Your success and error handlers */ );

Parameters

message
ChatMessage ChatMessage ChatMessage

The chat message.

Returns

An asynchronous action.

Additional features and requirements

Capabilities
chat smsSend chatSystem

Remarks

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);
}