Вопрос

As far as i was able to find out there is two way how to get contacts on Windows phone 8. You can use either Windows.Phone.UserData at its classes and methods or Windows.Phone.PersonalInformation and its classes and methods. With UserData i have no problem i can easily get whatever is available but you have just read-only access. So thats why i use PersonalInformation for write access to contacts which kind of work fine but problem is that data from PersonalInformation and UserData cannot by easily converted to each other and they even have different information. From what i found PersonalInformation looks like better option cause it has ToVcardAsync and ParseVcardAsync methods also there is Id and remoteId field that i need to proper manipulation with contact. And my problem is that i cannot get information about contact from PersonalInformation. I am using msdn article :

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207024%28v=vs.105%29.aspx

but when i am trying to Querying for contacts just with default settings i got nothing zero contacts and as i mentioned before if i use UserData i get all information about all contact without a problem. I had set id capability for contacts. Please help thanks.

EDIT: After some testing i find out that from PersonalInformation through querying i can get only contacts that i had already inserted through ContactStore and StoredContact. Insert like this will create contacts with new account named by app that did this. So i am getting only contacts with this new account. i still cannot get any other contacts with other accounts that was for example created manually in phone or synchronized with one of the supported accounts.

Also with reinstalling of app all saved contacts through ContactStore and StoredContact disappear. That is kind of odd.

Это было полезно?

Решение

I am not completely clear on what your question is, but it is not possible to write to other contact stores that the one created by the app. And this will be removed when the app is uninstalled, as you stated.

You can not edit the contacts in the "default" contact store, only read some basic data (name, number, image) see this.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top