Custom Presence States

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Communicator Web Access 2007 can consume the custom presence states set in Office Communicator 2007. A maximum of four presence states can be set in Office Communicator.

The registry points to the XML file containing the custom presence states. The following figure shows the custom settings in the Registry.

Ee354324.63536261-79f4-442c-9adb-f9c12a3ac16c(en-us,office.13).jpg

The xml configuration file contains the custom presence states.

<?xml version="1.0" encoding="utf-8" ?>
<customStates>
  <customState ID="1" availability="online">
    <activity LCID="1033">Working from Arlington</activity>
  </customState>
  customState ID="2" availability="busy">
    <activity LCID="1033">In a Customer Seminar</activity>
  </customState>
  <customState ID="3" availability="busy">
    <activity LCID="1033">Customer Presentation</activity>
  </customState>
  customState ID="4" availability="do-not-disturb">
    <activity LCID="1033">Doing Budget</activity>
  </customState>
</customStates>

The Office Communicator 2007 client reads the custom settings from the configuration file and displays them as options. The following figure shows the custom presence in Office Communicator 2007.

Ee354324.61c64820-ec6d-4f7b-b315-061d4f4f438a(en-us,office.13).jpg

A C# code snippet for creating a custom presence class follows.

RawPresenceCategory item = new RawPresenceCategory(MyCategory, categoryXml);
PresenceCategory customPresenceItem = new PresenceCategory(instanceId, containerId, item);
customPresenceItem.ExpiryPolicy = ExpiryPolicy.Persistent;
mySession.PublishPresence (new PresenceCategoryItem[]{customPresenceItem});