os:activity Element

Switch View :
ScriptFree
os:activity Element

Contains all of the functionality of an Accelerator.

Syntax

<os:activity
    category = "sCategory">
<!-- child elements -->
</os:activity>

Attributes

category
Required. Specifies a category for the activity. The following values are examples:
AddAdd a bookmark, or comment using a social network.
BlogCopy selected content to a blog.
DefineLook up a word's definition.
MapLocate address on a map.
TranslateTranslate a word or document.

Element Information

Parent elements os:openServiceDescription
Child elements
Must occur at least once os:activityAction
Minimum availability Internet Explorer 8
Minimum operating systems Windows XP SP2

Remarks

Each os:activity element specifies a category attribute that describes a type of functionality. Accelerators are organized by category so that users can quickly access the type of operation that they want. The user determines the default Accelerator for a given category value when the Accelerator is installed.

If your Accelerator doesn't fit a recommended category, you can define your own. The category should be a verb that the user can recognize and not be tied to a specific brand or application. Additionally, because the value of the category attribute is used by Manage Add-ons to organize Accelerators in groups, it should be human-readable and capitalized appropriately.

Example

The following Accelerator allows the user to quickly send important document details to a blogging service.


<?xml version="1.0" encoding="utf-8" ?> 
<openServiceDescription
    xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
  <homepageUrl>http://example.com/</homepageUrl> 
  <display>
    <name>Blog with MyBlogs</name> 
    <icon>http://example.com/favicon.ico</icon>
  </display>
  <activity category="Blog">
    <activityAction context="selection">
      <execute method="get" action="http://www.example.com/BlogIt.aspx">
        <parameter name="title" value="{documentTitle}" /> 
        <parameter name="SourceURL" value="{documentUrl}" /> 
        <parameter name="description" value="{selection}" type="html" /> 
      </execute>
    </activityAction>
    <activityAction context="document">
      <execute method="get" action="http://www.example.com/BlogIt.aspx">
        <parameter name="title" value="{documentTitle}" /> 
        <parameter name="SourceURL" value="{documentUrl}" />
      </execute>
    </activityAction>
    <activityAction context="link">
      <execute method="get" action="http://www.example.com/BlogIt.aspx">
        <parameter name="title" value="{linkTitle}" /> 
        <parameter name="SourceURL" value="{link}" />
      </execute>
    </activityAction>
  </activity>
</openServiceDescription>