Reputation: 101
i want to make a phone call and send an email from my UWP but i don't know how to ... is their anyway to help me get through this by providing for me an example or some tutorial..
This is the code i tried but it didn't work
using Microsoft.Phone.Tasks;
PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "2065550123";
phoneCallTask.DisplayName = "Gage";
phoneCallTask.Show();
thanks in advance and i really appreciate your help . Update I just found this code snippet
Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI("+380442308888", "The Name goes here");
and it looks like i need to add a reference Windows.Foundation.UniversalApiContract.
but i can't find it in the reference list .. am i on the right way and if so please help add this reference
Upvotes: 0
Views: 1511
Reputation: 1353
you must use PhoneCallManager to make calls
if you want to send an email you need to create a EmailMessage object and use ShowComposeEmailAsync
https://msdn.microsoft.com/en-us/windows/uwp/contacts-and-calendar/sending-email
Update:
here is the example for using calls.
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/PhoneCall
Upvotes: 2