Preparing an SMS With the SmsComposeTask

,

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

Sample Overview

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).

Image

FIGURE 14.22 The built-in Messaging app.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.56.216