Is there any possibility to send SMS without using the launcher task: SmsComposeTask in Windows Phone 7.x ? There are apps like Emergency SMS that seem to do that, meaning the S
Looks like with Windows 10 is now possible to do that https://github.com/Microsoft/Windows-universal-samples/blob/master/smssendandreceive/cs/smssendandreceive/sendtextmessage.xaml.cs
Confirmed! With Windows 10 Mobile (10.0.12648.133, Build 10149) and Windows SDK 10158 I was able to send a sms without confirmation screens at all!
Add to your package manifest XMLs:
xmlns:r="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
Capabilities:
the full code:
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
Task.Run(async () =>
{
await SendSms();
}).ConfigureAwait(false);
}
SmsDevice2 device;
async Task SendSms()
{
try
{
device = SmsDevice2.GetDefault();
}
catch (Exception ex)
{
return;
}
SmsTextMessage2 msg = new SmsTextMessage2();
msg.To = "+1000000000";
msg.Body = "test";
SmsSendMessageResult result = await device.SendMessageAndGetResultAsync(msg);
}