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:
<r:Capability Name="cellularMessaging" />
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);
}
No, there is no way to send an SMS without confirmation from the user. I haven't come across an emergency app that does this, but if they do, they may be using a web service to send the text instead of the phone's actual SMS facility. So instead of sending an SMS, they post the data to a web service which, in turn, sends the text message.