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

Saving a Contact’s Phone Number with the SavePhoneNumberTask

The save phone number task is used to launch the built-in Contacts app, allowing the user to save a specified phone number. This chooser does not return data, but you can handle the Completed event to determine whether the task was completed correctly.

SavePhoneNumberTask contains a single PhoneNumber property, which is passed to the Contacts application when the task’s Show method is called.

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

readonly SavePhoneNumberTask savePhoneNumberTask                                     = new SavePhoneNumberTask();

Subscribe to the SavePhoneNumberTask.Completed event within your class constructor, ...

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