Windows Phone: How to send programmatically SMS ?

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

Sending of SMS is a Task related action, which requires two assemblies to be referenced:

Microsoft.Phone
Microsoft.Phone.Tasks

This is very simple code which will send SMS to some specified number:

SmsComposeTask smsTask = new SmsComposeTask();
smsTask.To = "+38 7 111 222 444";
smsTask.Body = "Text specified by coding \r\n";
smsTask.Show();

And here is the result. After executing the code SMS will not be sent by some process in background. The user will have possibility to change the text or to attach some file before sending the SMS by herself.

image


Posted Jun 06 2010, 12:45 AM by Damir Dobric
Filed under:

Comments

Else wrote re: Windows Phone: How to send programmatically SMS ?
on 10-20-2010 17:27

Ok... but there's a way to send an SMS without user interaction?

tnx

developers.de is a .Net Community Blog powered by daenet GmbH.