This is a mirror of official site: http://jasper-net.blogspot.com/

How to send SMS in Windows Phone 7 using C# ?

| Thursday, March 31, 2011
The developers can make use of the SMSComposeTask launcher to send the SMS in Windows Phone 7 .

To send the SMS in Windows Phone 7 using SMSComposeTask by including the namespace Microsoft.Phone.Tasks

using Microsoft.Phone.Tasks; 

The Microsoft.Phone.Tasks namespace includes the classes necessary for all the Launcher and Chooser tasks .

Now , create the instance of the SMSComposerTask and set its “To” field to a valid number and the “Body” property to a text to be sent .

private void button1_Click(object sender, RoutedEventArgs e)
{
     SmsComposeTask composeSMS = new SmsComposeTask();
     composeSMS.Body = " This is a Test SMS sent using SmsComposeTask launcher";
     composeSMS.To = "1765432548";
     composeSMS.Show();
}

The Show method will display the SMSComposer screen which requires the user interaction to send the SMS .

16-118x200.jpg

Read more: Ginktage

Posted via email from Jasper-net

0 comments: