Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access and modify contacts in Windows 8?

I have found a new contacts API in Windows 8: http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts%28v=VS.85%29.aspx

However I am unable to find out how to list all contacts and add or delete a contact.

Any hints?

like image 781
TN. Avatar asked Oct 17 '11 13:10

TN.


2 Answers

Check out the Contact Picker sample. You can't just go modify contacts, you have to have the user select them for you first. This is done with the pickSingleContactAsync() method. This gets you a ContactInformation object which you can query or modify.

like image 69
Steve Rowe Avatar answered Oct 05 '22 11:10

Steve Rowe


Contact Lets your app create a new contact. Available only if your app uses the Contact contract.

PickMultipleContactsOperation Launches the user interface of the Contact Picker to select multiple contacts.

PickSingleContactOperation Launches the user interface of the Contact Picker to select a single contact.

These three classes and/or methods will do everything you want except delete a contract, which I would hope is not exposed to an application.

Remember the documentation and API is not finished.

like image 35
Security Hound Avatar answered Oct 05 '22 10:10

Security Hound