How to get the ID of the contact on Windows Phone contact list?

717 views Asked by At

I want to get ID of Contact List Application... Currently I am using class named PhoneNumberChooserTask like Chooser Class but I get only Number, Name, FullName. etc.. but how to get ID of that contact?

4

There are 4 answers

3
Isaiyavan Babu Karan On BEST ANSWER

Yes It is possible,

Contact c = new Contact();
var Id = c.GetHashCode(); //gives the Id property value.
0
Byron Gavras On

According to this answer GetHashCode returns the private property ID of the contact. I have confirmed that in 3 devices (Lumia 620, Lumia 1320, Lumia 925) running Windows Phone 8.1 and it seems to work. I changed contacts details but the ID remained the same.

Uniquely identifying contacts in a Windows Phone Address Book

2
Claus Jørgensen On

You have nothing to use the ID for, so it's simply not available to you as a developer. (That means it's not possible.)

0
timtos On

For Windows Phone 8.1 RT you can just use the contact Id property. GetHashCode() is no longer needed.