triandicAnt
triandicAnt

Reputation: 1378

Send sms Silently in WP8

I was trying to send sms to a group of contacts via SmsComposeTask class. But this class's Show() method only composes message in message app. I also want my code to send those texts automatically. Please help!! Here is what i am using:

 SmsComposeTask smsComposeTask = new SmsComposeTask();
 smsComposeTask.To = recipients; // recipients is the group of contacts
 smsComposeTask.Body =
 "Hello! This is a test sms message!";
 smsComposeTask.Show();

Upvotes: 0

Views: 1492

Answers (1)

ToastyMallows
ToastyMallows

Reputation: 4273

See: http://social.msdn.microsoft.com/Forums/wpapps/en-us/85dc6ef5-98a9-4a17-a5f0-171372d8d9a3/how-to-send-sms-from-a-windows-phone-page

using Microsoft.Phone.Tasks;

SmsComposeTask smsComposeTask = new SmsComposeTask();

smsComposeTask.To = "2065550123"; smsComposeTask.Body = "Your SMS text";

smsComposeTask.Show();

After that a dialog will be show asking the user whether to send the message.

You cannot silently send an SMS

Also: https://developer.nokia.com/Community/Wiki/How_to_send_an_SMS_in_Windows_Phone

Note: In contrast to Symbian, Windows Phone does not allow you to send sms "directly" or "silently" from your own app. As soon as sms sending initiation code below is executed the native sms editor app will be launched, giving the user the option to send the message or not.

I image this is done so that rouge apps can't send out a bunch of texts that will cost someone money.

Upvotes: 2

Related Questions