Saving a Contact’s Email Using the SaveEmailAddressTask

The SaveEmailAddressTask is a chooser that allows the user to save a specified email address using the built-in Contacts application. An email address can be saved to an existing contact or to a new contact. SaveEmailAddressTask does not return data, but its Completed event can be handled to determine whether the task was completed correctly.

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

readonly SaveEmailAddressTask saveEmailAddressTask                                        = new SaveEmailAddressTask();

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

saveEmailAddressTask.Completed ...

Get Windows® Phone 8 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.