How to get to the Messaging app to text someone?
I'm making an app and I want to be able to go 开发者_StackOverflowfrom my app to the messaging app straight to the "Create new" page. Is there a way I can navigate to that page straight from my app?
As Andrew M mentioned, the SmsComposeTask
is the correct control to use. Here is some sample code for you:
SmsComposeTask smsTask = new SmsComposeTask();
smsTask.To = "0123456789"; // the number you would like to send the sms to
smsTask.Body = "Some prefilled text..."; // if you would like to fill some text
smsTask.Show();
When Show()
is called, the app will navigate to the Messaging application and display an SMS filled in with the defined parameters.
Simply use the above code in an event handler (i.e., the event for when a button is clicked), and the user will be navigated accordingly.
Use the SMSComposeTask:
http://www.nickharris.net/2010/09/how-to-sms-using-the-smscomposetask-for-windows-phone-7/
精彩评论