Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access contacts list in Windows Phone 7?

How do you access the contacts store (the contact list) within Windows Phone 7?

Thanks!

update: It seems that this might be available in the next version of WP7, Mango:

Link

like image 467
Alex Avatar asked Nov 05 '10 15:11

Alex


People also ask

Where are contacts stored on Windows Phone?

If you're signed in to your Microsoft Account, any contacts that you save on your windows phone will synchronize to cloud, and will also be saved in your Microsoft account.

How do I open Windows Contacts?

Use the People app to see all your contacts in one place, listed alphabetically. To open the app, select the Start button, and then select People. Enter your account info if you're asked to sign in.


2 Answers

EDIT: This answer was correct at the time of posting. In Windows Phone 7.1 (Mango) third-party applications will have access to contacts.


You can't. You're not allowed to. That's viewed as private data that applications shouldn't be touching.

EDIT: Although you can't directly access the contacts list, you can launch the EmailAddressChooserTask or PhoneNumberChooserTask to get back just that piece of information about a user-specified contact. (Likewise you can launch a task to save a phone number or email address.)

like image 118
Jon Skeet Avatar answered Oct 27 '22 08:10

Jon Skeet


There is a official Walkthrough at Microsoft especially for Mango Beta 2.

Windows Phone SDK 7.1 Beta 2 gives you read-only access to the user’s contact data, aggregated across the user's different accounts.

Only possible way to save new details to a contact is via the Launchers:

  • SaveEmailAddressTask
  • SavePhoneNumberTask
  • SaveContactTask (which is new to Mango Beta 2)

For read only you can use:

  • PhoneNumberChooserTask
  • EmailAddressChooserTask
  • AddressChooserTask (which is new to Mango Beta 1)

If you want to query the whole contact list, you will need LINQ.

like image 37
Markus Rudel Avatar answered Oct 27 '22 07:10

Markus Rudel