O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Selecting a Phone Number with the PhoneNumberChooserTask

The phone number chooser task is used to launch the built-in Contacts application and allows the user to select a contact. A phone number for the contact is then returned to your app.

Note

To query the user’s contact list without requiring the user to select a contact, use the Contacts class, described later in this chapter.

The PhoneNumberChooserTask should be defined as a field in your class, like so:

readonly PhoneNumberChooserTask phoneNumberChooserTask                                     = new PhoneNumberChooserTask();

Subscribe to the PhoneNumberChooserTask.Completed event within your class constructor, as shown:

PhoneNumberChooserTask.Completed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required