A UWP application, launched on a smartphone, allows showing a dialog to start a call with a given number. Such a task requires just one line of code. Of course, you should also take care about devices that do not support calling. You will learn how to achieve this goal in the current recipe.
As an example, you will create a simple page with a button. After clicking on it, a dialog should be presented that allows calling a given phone number. Of course, you will handle a scenario of not supporting such a feature. In such a case, a message is shown.
To prepare an example that allows starting a phone call, perform the following steps:
Add reference to Windows Mobile Extensions for the UWP. To do so, choose Add | Reference... from the context menu of the project node in the Solution Explorer window, click on Universal Windows | Extensions in the Reference Manager window...