I'm writing an app which will make a phone call, send sms or email just like the People app in wp 8.1 . So far I've found a link form msdn which said "Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1". So here the code:from this link
using Microsoft.Phone.Tasks;
private void TextBlock_Tapped_Call(object sender, TappedRoutedEventArgs e)
{
PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "2065550123";
phoneCallTask.DisplayName = "Gage";
phoneCallTask.Show();
}
But I got an error:
The type or namespace name 'Phone' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Edit: Sorry for a duplicate question, same here: Make a phone call in Windows Phone 8.1 Answer by @Chris Shao, he also updated code to send SMS and Email.
If you want to use
Microsoft.Phone.Tasks
, you must create Windows Phone Silverlight 8.1 project. And if your project is Windows Phone 8.1,you can use this code to phone call:
and use this to send sms:
and use this to send mail: