Created
December 1, 2015 12:33
-
-
Save dkittell/025bfa7e07b7a052eee6 to your computer and use it in GitHub Desktop.
C# - Windows Phone 8 - SMS Via Program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Phone.Controls; | |
using Microsoft.Phone.Tasks; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Windows; | |
using System.Windows.Controls; | |
using Windows.Phone.Speech.Recognition; | |
using Windows.System; | |
// Original Credit Goes To: AbundantCode | |
// http://abundantcode.com/how-to-send-sms-in-windows-phone-8-programatically-using-c/ | |
namespace AbundantCodeWP8 | |
{ | |
public partial class MainPage : PhoneApplicationPage | |
{ | |
public MainPage() | |
{ | |
InitializeComponent(); | |
} | |
private void Button_Click_1(object sender, RoutedEventArgs e) | |
{ | |
SmsComposeTask SMSCompose = new SmsComposeTask(); | |
SMSCompose.To = "<Number to which the SMS needs to be sent"; | |
SMSCompose.Body = "Message that needs to be sent"; | |
SMSCompose.Show(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment