0

I need to show contacts in my application and make a connection with Instance Messaging application such as WahtsApp and the others, so I added this code to my application but I could not find the account type from it.

var contacts = await Device.Contacts.GetAll();
foreach (var contact in contacts)
{
    // find contacts has connection with other applications
}
JohnMax
  • 103
  • 7

1 Answers1

0

To get account type or account id of the contact you can use InstanceMessaging property in contact information like below and for more information, you can see link below.

var contacts = await Device.Contacts.GetAll();
foreach (var contact in contacts)
{
    if (contact.InstantMessagingAccounts.Any())
    {
        var connections = contact.InstantMessagingAccounts;
    }
}

And for getting userId you can use UserId and for account type, you can use Service property.

http://zebble.net/docs/accessing-device-contacts

Disclaimer: I am a Zebble project contributor and engage in technical support.

J.ws
  • 16