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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.