Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a phone call in Windows Phone 8.1

Tags:

I'm writing a Universal App for Windows 8.1 / Windows Phone 8.1 that at some point displays a list of phone numbers. What I would like to do is allow the user to press one of these numbers and have the device call (or ask permission to call) that number if running on Windows Phone 8.1. I know this was previously possible in Windows Phone 8 by doing the following:

using Microsoft.Phone.Tasks;  PhoneCallTask phoneCallTask = new PhoneCallTask();  phoneCallTask.PhoneNumber = "2065550123"; phoneCallTask.DisplayName = "Gage";  phoneCallTask.Show(); 

NOTE: This code is wrapped in #if WINDOWS_PHONE_APP

However, when trying to import Microsoft.Phone.Tasks, Visual Studio is unable to find the reference. I know that "ID_CAP_PHONEDIALER" had to be enabled in WMAppManifest.xml in Windows Phone 8, but this doesn't seem to be possible with the universal app model. I've been searching around for a solution but can't find a recent one that includes Windows Phone 8.1 (not Silverlight).

Is there any way to make a phone call from within a universal app? Or is it simply not possible at the moment?

like image 850
robmikh Avatar asked May 09 '14 02:05

robmikh


People also ask

Can I make a phone call from my computer without a phone?

Computer to telephone calls are made via internet network transmissions. Similarly in VoIP software, your device captures your voice as a digital signal, routes it through the internet network as an Internet Protocol packet, then to the device you're calling, and plays the digital signal received.


1 Answers

In Windows Phone 8.1, We can make phone call by "Windows.ApplicationModel.Calls.PhoneCallManager", just like this:

Windows.ApplicationModel .Calls.PhoneCallManager .ShowPhoneCallUI("phone number", "display name"); 
like image 144
Chris Shao Avatar answered Oct 13 '22 01:10

Chris Shao