Make Call using Phone Call Task in Windows Phone app (C# code)

We can make a call use tel protocol in Web browser with HTML code. Like this <a href="tel:012345">Make a call</a>. just we need to pass phone number tel:[phone number here]. Mostly all smartphones support this protocol. We can also have in differentiate format phone numbers. If smart phone OS won’t support all the format.

Make call using windows phone app C# code
Make call using windows phone app C# code

In windows phone we can also make a call using Phone Call Task from C# code from our Windows Phone App. We can make a call when user tap a button or some other action performed. Using Phone Call Task, we can set Phone Number and also Display name. Please check with below lines of code. We have to place this code inside button click or where you want and change phone number and display name. It will work sure!

PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "Phone Number Here";
phoneCallTask.DisplayName = "Display Name HERE";   // I set to Naga Harish, you can see in the above image.

Enjoy While coding..!

Leave a Reply