Problem:
I am migrating a windows phone 8 app to windows phone 8.1. The move forward involved changes to the namespaces where the phone tasks occurSolution:
Making a call in Windows Phone 8- Add the following statement to your code.
using Microsoft.Phone.Tasks;
- Add the following code to your application wherever you need it, such as in a button click event. To test this procedure, you can put the code in the page constructor. This is the code to launch the task.
PhoneCallTask phoneCallTask = new PhoneCallTask(); phoneCallTask.PhoneNumber = "2065550123"; phoneCallTask.DisplayName = "Gage"; phoneCallTask.Show();
Making a call in Windows Phone 8.1
Add the following code to your application wherever you need it, such as in a button click event. To test this procedure, you can put the code in the page constructor. This is the code to launch the task.
Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI("phone number", "display name");
Source:
- https://msdn.microsoft.com/de-de/library/windows/apps/hh394025(v=vs.105).aspx
- http://stackoverflow.com/questions/23555640/make-a-phone-call-in-windows-phone-8-1
No comments:
Post a Comment