我需要开发一个应用程序,以便使用Visual Studio从Windows Phone 8应用程序拨打电话。
但是我找不到任何资源来做到这一点。
单击一个按钮后,我需要拨打已经给出的手机号码。
通过单击该按钮,我必须仅拨打该手机号码。
这就是我编写的代码。单击给定按钮时,此方法正在调用...
private void HyperlinkButton_Click_1(object sender, RoutedEventArgs e)
{
PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "0719957868";
phoneCallTask.DisplayName = "Gage";
phoneCallTask.Show();
}
但是我遇到了一个未处理的异常。
未处理的异常。
// Code to execute on Unhandled Exceptions
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
if (Debugger.IsAttached)
{
// An unhandled exception has occurred; break into the debugger
Debugger.Break();
}
}
使用时PhoneCallTask
,您必须在WMAppManifest.xaml中指定应用程序的新功能:ID_CAP_PHONEDIALER
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句