Вопрос

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.

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

Решение

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/

Другие советы

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();
             }
     }
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top