Partilhar via


Publish Presence (QuickStart)

Sample name: PublishPresence

Sample location: %ProgramFiles%\Microsoft UCMA 3.0\SDK\Core\Sample Applications\QuickStarts\PublishPresence

Description

The application initializes the platform and a user endpoint and subscribes to the sample user's presence (self-presence). The sample then publishes the user state, machine state, note, and contact card. The note is published using raw XML, while all other categories are published using strongly-typed objects. The sample then deletes the presence categories that it published, terminates the endpoint, and shuts down the platform, exiting normally.

You can log into the same user as the sample using a client (such as Microsoft Lync 2010), to see the categories being published.

Features

  • Presence publication using a grammar and strongly-typed categories.

  • Published categories: contact card, aggregate state, note, and photo.

Prerequisites

  • Microsoft Lync Server 2010.

  • One user, enabled to use Lync Server 2010.

  • The credentials for that user.

Running the Sample

  1. Supply the configuration settings to be used by the sample in the accompanying App.config file, you will be prompted for them when you run the sample.

  2. Open the project in Microsoft Visual Studio development system, and then press F5.

  3. Change the presence of the user logged in on Lync 2010, and see the presence change in the console.