The SMS compose task is used to launch the built-in Messaging app, allowing the user to create a new SMS message.
Note
The message is not sent until it is initiated by the user.
You can optionally specify recipients and a message body, which are prepopulated in the new message, as shown in the following excerpt:
SmsComposeTask smsComposeTask = new SmsComposeTask
{
To = "885729",
Body = "Hi from Windows Phone!"
};
smsComposeTask.Show();
Example code for the SmsComposeTask
can be found in the SmsView
page and SmsViewModel
classes in the downloadable sample code.
The SmsView
allows the user to launch the built-in Messaging app when a button is tapped (see Figure 14.22).
52.14.82.217