Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Making Phone Calls

Windows Phone is, of course, a phone. You can use the PhoneCallTask, shown in Listing 21.10, to allow the user to easily dial a phone number. The user will first be prompted, allowing the user to cancel the call. This prompt also prevents an application from dialing a phone number without the user’s knowledge.

Listing 21.10 The PhoneCallTask


PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "1231231234";
phoneCallTask.DisplayName = "ABC, Corp.";
phoneCallTask.Show();


Choosing and Saving Phone Numbers

Just as the EmailAddressChooserTask allows the user to select an email address from his or her available contacts in the People hub, the PhoneNumberChooserTask, shown in Listing 21.11, allows the user to select the phone number from a contact.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial