Microsoft Screwed Up Activities API Docs – It's addService NOT AddService

UPDATE: jst ROCKS! – I was able to do exactly what he said and I now have both cases of APIs working in my extension.

OK, this is really starting to bother me because Activities are starting to show up and they don’t work on Firefox because Microsoft screwed up the documentation.

The correct syntax for adding an Activity (per my conversation with Microsoft) is:

window.external.addService('FindInWikipedia.xml');
as documented here
NOT

window.external.AddService('FindInWikipedia.xml');
as documented here. (I have no idea what the whitepaper says – I can’t agree to the license agreement.

Note the lowercase a at the beginning. Even though both work on IE, USE THE LOWERCASE addService!

You would think people would have just cut and paste the code from the Activity Providers site and got it right.

Incidentally, if anyone knows how to create an API in Firefox that will work with either case, that would be great. Then I could work like Internet Explorer.

Tags: , ,

8 Responses to “Microsoft Screwed Up Activities API Docs – It's addService NOT AddService”

  1. asdf says:

    window.external.IsServiceInstalled
    window.external.AddService

    that’s what in the whitepaper, but you probably knew that already ;)

  2. Albert says:

    The whitepaper mentions both addService and AddService, even on the same page. Looks like a quick & dirty job to me…

  3. Johnny Stenback says:

    If you’re implementing this using XPCOM interfaces it would seem to me that you could create two unrelated interfaces (no inheritance relationship between the two), one defining “addService”, the other defining “AddService” and you advertise both these interfaces through an nsIClassInfo implementation callers should be able to call either function.

  4. Mitch Denny says:

    Hi mate,

    I’ve updated my samples.

  5. Bob says:

    Deep breath, man. Bugs happen. It’s a Beta (heck, it’s a Developer Preview).

  6. [...] figure out how to get the information I wanted to put into the post to del.icio.us. Also, thanks to this post for causing me to think that it’s time to write [...]

  7. Thomy Kay says:

    I created an activity xml according to a href=”http://msdn2.microsoft.com/en-us/library/cc289775(VS.85).aspx”>http://msdn2.microsoft.com/en-us/library/cc289775(VS.85).aspx.

    IE is able to deal with namespaces correctly (os:* elements), your implementation is not. One reason is that it searches for element names without namespaces.

    Would be good to support namespaces correctly in your plugin.

  8. [...] is much better, and I was able to support both the uppercase and lower case version of the API (which I complained about earlier). In addition, the code has been substantially rewritten so that it doesn’t affect the global [...]

Leave a Reply