In the Windows Phone 8.0 and earlier versions , the developers could use the PhoneCallTask which allows the use to make a phone call. If you are targeting Windows Phone 8.1 Silverlight App model , this will still work fine . How about the Windows Phone 8.1 Windows Runtime App ?
How to make a Phone Call in Windows Phone 8.1 XAML App ?
If you are targeting the Windows Phone 8.1 XAML App (Windows Runtime App) , you can use the ShowPhoneCallUI static method that is defined in the PhoneCallManager class .
Below is a method that demonstrates how to show the Phone Call UI / Dialler programmatically from your app.
// Make a phone call using the PhoneCallManager in Windows Phone 8.1 WinRT App public void MakePhoneCall(string PhoneNumber,string DisplayName) { Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI(PhoneNumber, DisplayName); }
When the above method is called by passing the phone number and the display name as shown below , you will see the Phone Call UI .
MakePhoneCall("0000000000", "Senthil Kumar");
2 Comments
Perfect, thank you!
Is there any way to avoid conformation of dialing?