Hi Guys
I have a Lync 2013 Client 2013 running on a desktop.
I have my status timers set to 5 minutes - Inactive and 5 minutes - Away so after 10 minutes the presence state is "Away".
I have an application using Lync 2013 SDK which tries to wake up Lync client, and change it's presence.
When Lync client is active, or inactive, I can change the presence, but when it is away, then I cannot change presence.
Is there a workaround to this.
The method I am using is as follows:
/// <summary>/// Sets the contact's current availability value to Lync Client.
/// </summary>
public bool SetAvailability(AvailabliltyEnums avail)
{
Dictionary<PublishableContactInformationType, object> newInformation = new Dictionary<PublishableContactInformationType, object>();
var reMapedAvailabilty = this.RemapAvailabiltyEnum(avail);
newInformation.Add(PublishableContactInformationType.Availability, reMapedAvailabilty);
newInformation.Add(PublishableContactInformationType.ActivityId, "Available");
// Publish the new availability value
try
{
this.lyncClient.Self.BeginPublishContactInformation(newInformation, this.PublishContactInformationCallback, null);
this.log.InfoFormat("SetAvailability:{0} remapped:{1}", avail.ToString(), reMapedAvailabilty.ToString());
}
catch (LyncClientException lyncClientException)
{
Console.WriteLine(lyncClientException);
this.log.ErrorFormat("SetAvailability-1: error {0}", lyncClientException);
}
catch (SystemException systemException)
{
if (LyncModelExceptionHelper.IsLyncException(systemException))
{
// Log the exception thrown by the Lync Model API.
this.log.ErrorFormat("SetAvailability-2: error {0}", systemException);
}
else
{
// Re throw the SystemException which did not come from the Lync Model API.
throw;
}
}
return true;