Answered by:
Retrieving contact from Contacts application: ContactManager.RequestStoreAsync method does not exist.

Question
-
Hello
I am developping an Windows App from which I want to get information from the Contacts windows app.
I played around with the namespace Windows.ApplicationModel.Contacts.
The application calls successfully Windows.ApplicationModel.Contacts.ContactPicker() to allow the user to select one or more contacts. From the selection, the application stores the contact.id, so to be able to retrieve the contact details using snippet of code like the one below.
var ns = Windows.ApplicationModel.Contacts; ns.ContactManager.requestStoreAsync().done(function (contactStore) { //code that interacts with contactStore, calls findContactsAsync with another chained promise, etc. });
Unfortunatelly, it turns out that, in my environment, the method requestStoreAsync() does not exist on the ContactManager object!
First, intellisense does not show the method and second when I run the application, an exception is thrown, complaining the method does not exist...
My environment: windows 8.1 pro + Visual Community Edition 2013, both with all the latest updates.
I am completely stucked here and would appreciate any help to solve this.
Regards
François Vanzeveren
Sunday, March 29, 2015 3:39 PM
Answers
-
Hi Francois,
>>Unfortunatelly, it turns out that, in my environment, the method requestStoreAsync() does not exist on the ContactManager object!
This API is not supported in Windows Store app: https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactstore.aspx
Quote:
To get a ContactStore object in JavaScript, use code similar to this:
JavaScript:
var ns = Windows.ApplicationModel.Contacts; ns.ContactManager.requestStoreAsync().done(function (contactStore) { //code that interacts with contactStore, calls findContactsAsync with another chained promise, etc. });
Requirements (operating system)
Minimum supported client: None supported [Windows Store apps only]
Minimum supported server: None supported [Windows Store apps only]
Minimum supported phone: Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]I would suggest you checking this official sample:
#Contact manager API sample
https://code.msdn.microsoft.com/windowsapps/Contact-manager-API-sample-319bdcefWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Marked as answer by Francois Vanzeveren Monday, March 30, 2015 12:14 PM
Monday, March 30, 2015 8:11 AMModerator
All replies
-
Hi Francois,
>>Unfortunatelly, it turns out that, in my environment, the method requestStoreAsync() does not exist on the ContactManager object!
This API is not supported in Windows Store app: https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactstore.aspx
Quote:
To get a ContactStore object in JavaScript, use code similar to this:
JavaScript:
var ns = Windows.ApplicationModel.Contacts; ns.ContactManager.requestStoreAsync().done(function (contactStore) { //code that interacts with contactStore, calls findContactsAsync with another chained promise, etc. });
Requirements (operating system)
Minimum supported client: None supported [Windows Store apps only]
Minimum supported server: None supported [Windows Store apps only]
Minimum supported phone: Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]I would suggest you checking this official sample:
#Contact manager API sample
https://code.msdn.microsoft.com/windowsapps/Contact-manager-API-sample-319bdcefWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Marked as answer by Francois Vanzeveren Monday, March 30, 2015 12:14 PM
Monday, March 30, 2015 8:11 AMModerator -
Hello
Thank you for your answer.
What a pitty this functionality does not exist on Windows Store Apps.
Regards
Monday, March 30, 2015 12:14 PM