Below is a sample code snippet that demonstrates how to make a call from a Windows Phone 8.1 app in the Windows Runtime App Model.
How to make a Phone Call from a Windows Phone 8.1 App ?
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel.Calls;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace WP81ACXAMLApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
this.NavigationCacheMode = NavigationCacheMode.Required;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
// How to make phone call in Windows Phone 8.1 Apps
PhoneCallManager.ShowPhoneCallUI("Abundantcode Phone Number here", "Abundantcode");
}
}
}
Leave a Reply