1 out of 2 rated this helpful - Rate this topic

Contacts and Calendar for Windows Phone

Windows Phone

March 22, 2012

Windows Phone SDK 7.1 gives you read-only access to the user’s contacts and calendar data. You can now differentiate your applications by querying and interacting with the user’s data. Windows Phone supports letting the user choose from a list of their contacts and sending them emails, searching for contacts’ birthdays, finding appointment times, and many other scenarios.

Windows® Phone provides an aggregated view of the user’s contact data across the user's different accounts. Information can come from sources such as data entered in the phone itself, social networking sites, and other data service providers. Not all data from all service providers is exposed publicly through the contacts and calendar API. The StorageKind enumeration lists the possible sources of data.

The following table summarizes what data is available from each provider.

Data provider

Contact name

Contact picture

Other contact data

Calendar appointments

StorageKind enumeration

Windows Phone Device

Yes

Yes

Yes

Yes

Phone

Windows Live Social

Yes

Yes

Yes

Yes

WindowsLive

Windows Live Rolodex

Yes

Yes

Yes

Yes

WindowsLive

Exchange Accounts (Contacts are from the local address book only, not the global address list.)

Yes

Yes

Yes

Yes

Outlook

Mobile Operator Address Book

Yes

Yes

Yes

No

Other

Facebook

Yes

Yes

No

No

Facebook

Windows Live Aggregated Networks (Twitter, LinkedIn, and so on)

No

No

No

No

None

The following are some best practices for creating applications that are ready for the Windows Phone Marketplace.

  • Before you access contact and calendar data, you should obtain the user’s permission and provide a privacy policy. For more information, see requirement 2.11 in the Application Policies.

  • There are CAPABILITY elements in the application manifest file that correspond to accessing contact and calendar data. For more information, see Application Manifest File for Windows Phone.

  • Contact data is provided as a read-only snapshot. If your application needs fresh data, repeat the original search periodically.

  • Contact data can vary widely in size. Be prepared for very large contact lists by providing a message to the user when you are loading data.

  • Use the built-in filter searches, which are pre-indexed to be fast, instead of LINQ whenever possible. For more information, see Contact Filtering and Matching for Windows Phone.

Title

Description

How to: Access Contact Data for Windows Phone

Lists the steps for accessing contact data, and demonstrates how to bind the results to the user interface or to enumerate through the results. Also contains a LINQ example.

How to: Access Calendar Data for Windows Phone

Lists the steps for accessing appointment data, and demonstrates how to bind the results to the user interface or to enumerate through the results. Also contains a LINQ example.

How to: Display the Photo of a Contact for Windows Phone

Lists the steps for displaying the photo of a contact, either by calling the GetPhoto method directly, or by data-binding through a custom data converter.

Contact Filtering and Matching for Windows Phone

Describes how to use the built-in filters when searching for contacts, and describes how the filter strings are matched against the name, email, and phone number data.

Walkthrough: Accessing Contact and Calendar Data for Windows Phone

Walks you through the procedures to build and test a simple contacts and calendar application.

Did you find this helpful?
(1500 characters remaining)