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

Storing Contacts in the Custom Contact Store

Beginning with Windows Phone 8, each Windows Phone app is provided with its own contact store. Your app can add or remove contacts from the store, and contacts that are present in the store are displayed in the phone’s People Hub.

The contact store is retrieved by calling the Windows.Phone.PersonalInformation.ContactStore class’s static CreateOrOpenAsync method. If the store does not exist, it is created the first time the method is called. To add a contact to the contact store, create a StoredContact instance and call its SaveAsync method, as demonstrated in the following example:

ContactStore store = await ContactStore.CreateOrOpenAsync();StoredContact contact = new ...

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