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 const& message);
public static IAsyncAction ShowComposeSmsMessageAsync(ChatMessage message);
function showComposeSmsMessageAsync(message)
Public Shared Function ShowComposeSmsMessageAsync (message As ChatMessage) As IAsyncAction

Parameters

message
ChatMessage

The chat message.

Returns

An asynchronous action.

Windows requirements

App capabilities
chat chatSystem smsSend

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

Applies to