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 .
Read more: Ginktage
0 comments:
Post a Comment