Lync 2013 SDK - Cannot change presence when in Lync Client is in the "away" state.

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;
     
August 27th, 2015 6:15am

Hi,

You might post the issue on Lync MSDN forum and more developing expert will help to verify if this can be achieved using Lync SDK. Thank you for your understanding.

http://social.msdn.microsoft.com/Forums/en-US/communicatorsdk/threads

Best Regards,
Eason Huang

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 9:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics