2

I am writing a custom Lync client with UI suppression enabled. One of the components that the client needs to have is an employee search form, which will be used for adding contacts and inviting employees to a conversation. This form will load the employees in a DataGridView and display their availability (online, offline, idle, etc.).

However, the problem is that the availability only seems to correctly display for users that I am already a contact with. Everyone else will have their ContactAvailability set to None.

Is it possible to get the availability of a Lync user who is not a contact? Thanks in advance.

2 Answers2

1

I found the solution. I needed to use the ContactSubscription class: http://msdn.microsoft.com/en-us/library/hh380135.aspx

This link also proved helpful: http://rcosic.wordpress.com/2011/11/02/starting-with-lync-clients-api/

  • You can mark your own answer as the correct answer if you've answered your own question. It helps others identify the right thing to do if they have a similar problem. (you also get a badge and some more points!) (actually, maybe not with 1 point?!) – Tom Morgan Jun 22 '12 at 15:38
  • Hey, I hit this issue and I can't understand your solution. How do you reach that info? Does `ContactSubscription` allow you to see presence of non-contacts? – ahmet alp balkan Feb 06 '13 at 23:58
0

Querying Presence :

    _appEndPoint.PresenceServices.BeginPresenceQuery(new List<string>() {  "UriToQuery"  }, new string[] { "state" }, EndgetNotification, null, null);


    protected void EndgetNotification(object sender, RemotePresentitiesNotificationEventArgs e)
    {

       if (e.Notifications.Count > 0)
            {
              string strPresence =e.Notifications[0].AggregatedPresenceState.Availability.ToString();
             }
     }
ahmet alp balkan
  • 42,679
  • 38
  • 138
  • 214
Krishna
  • 36
  • 4