0

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.

Tomas Kosar
  • 394
  • 1
  • 10
  • 23

1 Answers1

2

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.

PKeno
  • 2,694
  • 7
  • 20
  • 37
  • thanks for reply. well i just thought that i can somehow manipulate with contacts. its possible in other phone platforms as i heard so i thought that even if wp8 is more strict there will be at least something. This kind of behavior is kind of weird to me. now i have to work with two collections of contacts that are not possible to merge. i did it somehow but its not perfect. if this is how it should be i will live with that what else can i do. i think that i read all available source on msdn about that and also bunch of articles elsewhere. i just thought that i might doing something wrong. – Tomas Kosar Jun 03 '13 at 08:34