uap:Protocol (Windows 10)

Declares an app extensibility point of type windows.protocol. A URI association indicates that the app is registered to handle URIs with the specified scheme.

Element hierarchy

<Package>
<Applications>
<Application>
<Extensions>
<uap:Extension>
<uap:Protocol>

Syntax

<Protocol Name           = A string between 2 and 39 characters in length that contains numbers, lowercased letters, dots ('.'), pluses('+'), or hyphens ('-'). The string can't start with a dot ('.').

              DesiredView?   = "default" | "useLess" | "useHalf" | "useMore" | "useMinimum"
              ReturnResults? = "none" | "always" | "optional" >

  <!-- Child elements -->
  ( uap:Logo?
  & uap:DisplayName?
  )

</uap:Protocol>

Key

?   optional (zero or one) &   interleave connector (may occur in any order)

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
DesiredView

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

This attribute can have one of the following values:

  • default
  • useLess
  • useHalf
  • useMore
  • useMinimum
No
Name

The name of the URI scheme, such as "mailto". This name must be unique for the package.

A string between 2 and 39 characters in length that contains numbers, lowercased letters, dots ('.'), pluses('+'), or hyphens ('-'). The string can't start with a dot ('.'). Yes
ReturnResults

Specifies whether the app returns a value when invoked via a URI activation.

  • None: does not return a value.
  • Always: URI activation with this protocol will always return a result.
  • Optional: URI activation with this protocol will return a result if it is activated for results (using [LaunchUriForResultsAndContinueAsync](https://msdn.microsoft.com/library/windows/apps/dn904655)). However, this protocol activation endpoint can also handle activation when results are not required.

This attribute can have one of the following values:

  • none
  • always
  • optional
No

 

Child Elements

Child Element Description
uap:DisplayName

A friendly name that can be displayed to users.

uap:Logo

A path to a file that contains an image.

 

Parent Elements

Parent Element Description
uap:Extension

Declares an extensibility point for the app.

 

Examples

The following example is taken from the package manifest of one of the SDK samples.

<Applications>
  <Application Id="App" StartPage="default.html">
    <Extensions>
      <uap:Extension Category="windows.protocol">
        <uap:Protocol Name="alsdk" />
      </uap:Extension>
    </Extensions>
  </Application>
</Applications>

See also

Tasks How to handle URI activation

Concepts App contracts and extensions

Requirements

Namespace

http://schemas.microsoft.com/appx/manifest/uap/windows10