Custom Presence in the Windows Live Messenger Library

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Custom Presence in the Windows Live Messenger Library - Presentation Transcript

    1. Windows Live Messenger Library Custom Presence
      • Custom Presence allows your web application to set custom presence properties on Messenger users
      • Uses:
        • Detect when two users are both signed into your custom Messenger application
        • Enables sharing of rich presence information between users of your web application
      • This allows you to ‘light up’ extra features between multiple users who are signed into your site
      • Create a presence extension object
        • This object must support the get_name() method
        • Other methods/data are up to you
      • Create a PresenceExtensionFactory object with two methods:
        • serialize(property): output a string representation of the presence extension object
        • deserialize(name, content): recreate the presence extension from the string representation
      • Set your PresenceExtensionFactory as the active presence factory
      • Add the presence extension to users’ presence
      • This Presence Extension stores simple name/value pairs – they can be fancier
      • var EXTENSION_NAME = ‘ExtNm’ // 6 chars or less
      • function MyPresenceExtension(name, content) {
      • this .name = name;
      • this .content = content;
      • }
      • MyPresenceExtension.prototype.get_name = function () {
      • return this .name;
      • }
      • MyPresenceExtension.prototype.get_content = function () {
      • return this .content;
      • }
      • This object serializes and deserializes your custom presence extension
      MyPresenceFactory = function () {} MyPresenceFactory.prototype.serialize = function (prop) { return prop.get_content(); } MyPresenceFactory.prototype.deserialize = function (name, content) { return new MyPresenceExtension(name, content); }
      • Add your presence factory to the user object
      • user.set_presenceFactory( new MyPresenceFactory());
      • Add your presence extension to the signed-in user
      • endpointColl = user.get_endpoints();
      • endpointPresence = endpointColl.get_item(0).get_presence();
      • extensionColl = endpointPresence.get_extensions();
      • extensionColl.add( new MyPresenceExtension(EXTENSION_NAME, 'Content' ));
      • For each contact, check their endpoints for the presence extension
      • endpointEnum = address.get_endpoints().getEnumerator();
      • while (endpointEnum.moveNext()) {
      • endpt = endpointEnum.get_current();
      • extEnum = endpt.get_presence().get_extensions().getEnumerator();
      • while (extEnum.moveNext()) {
      • extension = extEnum.get_current();
      • if (extension.get_name() == EXTENSION_NAME)
      • extensionContent = extension.get_content();
      • break ;
      • }
      • }
      • Simple Demo app at http://wlmlcustompresence.mslivelabs.com demonstrates how to use Custom Presence
      • Based on Hello World app ( http://wlmlhelloworld.mslivelabs.com )
      • To see the demo, sign in to the site twice, with two different Live IDs (Works best with two different browsers i.e. IE + Firefox)
      • Users signed into the demo are assigned a custom presence extension
      • If a contact in your list is signed into the same app, their status is shown with an asterisk *
      Contacts signed into the same demo site get a *
      • Demonstration App: http://wlmlcustompresence.mslivelabs.com/
      • SDK docs: http://msdn2.microsoft.com/en-us/library/cc298458.aspx
      • More information at http://dev.live.com/messenger

    + JasonKellyJasonKelly, 2 years ago

    custom

    2577 views, 1 favs, 6 embeds more stats

    Overview deck of the custom presence features in th more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2577
      • 1600 on SlideShare
      • 977 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 42
    Most viewed embeds
    • 869 views on http://www.msncreative.net
    • 102 views on http://www.wikikou.fr
    • 2 views on http://66.102.9.104
    • 2 views on http://cid-a8c4678b0f89676d.spaces.start.com
    • 1 views on http://www.online-translator.com

    more

    All embeds
    • 869 views on http://www.msncreative.net
    • 102 views on http://www.wikikou.fr
    • 2 views on http://66.102.9.104
    • 2 views on http://cid-a8c4678b0f89676d.spaces.start.com
    • 1 views on http://www.online-translator.com
    • 1 views on http://209.85.229.132

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories