LaunchAction (in ContactLaunchActions)

Describes a ContactLaunchActions content action.

Element hierarchy

<Extension>
<Contact>
<ContactLaunchActions>
<LaunchAction>

Syntax

<LaunchAction Verb         = "call" | "map" | "message" | "post" | "videoCall"
              DesiredView? = "default" | "useLess" | "useHalf" | "useMore" | "useMinimum" >

  <!-- Child elements -->
  ServiceId{0,100}

</LaunchAction>

Key

?   optional (zero or one) {}   specific range of occurrences

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
DesiredView

The desired amount of screen space to use when the contact launches.

Windows Phone:  DesiredView isn't supported for Windows Phone.

This attribute can have one of the following values:

  • default
  • useLess
  • useHalf
  • useMore
  • useMinimum
No
Verb

A unique identifier that is passed to the app when it is launched. The app can use this string to determine which ContactLaunchActions handler triggered its launch. It is unique per application in the package and is case sensitive.

This attribute can have one of the following values:

  • call
  • map
  • message
  • post
  • videoCall
Yes

 

Child Elements

Child Element Description
ServiceId

Identifies the service for a contact action.

 

Parent Elements

Parent Element Description
ContactLaunchActions

Declares actions to take when a contact is launched.

 

The following elements have the same name as this one, but different content or attributes:

Remarks

For more info about launch actions that a contacts provider takes, see ContactLaunchActionVerbs.

The manifest enforces these semantic checks for the Verb attribute for a ContactLaunchActions content action.

  • If Verb is set to map, it must not declare any ServiceId elements. All other values for Verb must declare a ServiceId.
  • Only if Verb is set to call or message, can it specify ServiceId as the well-known value 'telephone.'

The LaunchAction (in ContactLaunchActions) definition has these statements:

            <xs:element name="LaunchAction" maxOccurs="50">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ServiceId" type="CT_ServiceId" minOccurs="0" maxOccurs="100"/>
                </xs:sequence>
                <xs:attribute name="Verb" type="ST_ContactLaunchActionVerbs" use="required"/>
                <xs:attribute name="DesiredView" type="ST_DesiredView" use="optional"/>
                <xs:attributeGroup ref="m:ExtensionBaseAttributes"/>
              </xs:complexType>
              <xs:unique name="Service_Id">
                <xs:selector xpath="m2:ServiceId"/>
                <xs:field xpath="."/>
              </xs:unique>
            </xs:element>

The preceding 'ref' statement indicates that LaunchAction (in ContactLaunchActions) inherits all of these Extension base attributes:

  <xs:attributeGroup name="ExtensionBaseAttributes">
    <xs:attribute name="Executable" type="ST_Executable" use="optional"/>
    <xs:attribute name="EntryPoint" type="ST_EntryPoint" use="optional"/>
    <xs:attribute name="RuntimeType" type="ST_ActivatableClassId" use="optional"/>
    <xs:attribute name="StartPage" type="ST_FileName" use="optional"/>
  </xs:attributeGroup>

Because LaunchAction (in ContactLaunchActions) allows the Extension base attributes, it has these semantic validations that aren't covered by the XSD manifest schema:

  • Extension base attributes must follow these rules:

    • If the StartPage attribute is specified, fail if the EntryPoint, Executable, or RuntimeType attribute is specified.
    • Otherwise, fail if the Executable or RuntimeType attribute is specified without an EntryPoint specified.
  • If LaunchAction defines the EntryPoint attribute, either this LaunchAction or the parent Extension or Application element must specify an Executable attribute.

Requirements

Value
Namespace http://schemas.microsoft.com/appx/2013/manifest