Bewerken

Delen via


AutoplayHandler

MBAE deprecation warning

Important

Starting in Windows 10, version 1803, the MBAE app experience is replaced by an MO UWP app. For more information about MO UWP apps, see UWP mobile broadband apps.

The AutoplayHandler element specifies a UWP device app that should appear as the recommended AutoPlay action when a user plugs in a device.

Usage

<AutoplayHandler>
  child elements
</AutoplayHandler>

Attributes

There are no attributes.

Child elements

Element Description

PackageIdentity

Specifies the package identity (name and publisher) for the app.

Application

Specifies the application ID for the app.

Verb

Specifies the verb that the app registers.

AutoplayType

Specifies whether the AutoPlay event is a device event or a content event. AutoPlay determines the type of device and raises either a Device event for non-volume devices, or a Content event for volume devices.

EnableAutoPlayForRegisteredApps

Specifies whether AutoPlay is enabled for registered apps.

Parent elements

Element Description

LaunchApplicationOnDeviceConnect

Specifies an app that should appear as the recommended AutoPlay action when a user plugs in the device.

XSD

      <xs:element name="AutoplayHandler" type="tns:AutoplayHandlerType" />

  <xs:complexType name="AutoplayHandlerType">
    <xs:sequence>
      <xs:element name="PackageIdentity" type="tns:PackageIdentityType" />
      <xs:element name="Application" type="tns:ApplicationType" />
      <xs:element name="Verb" type="tns:VerbType" />
      <xs:element name="AutoplayType" type="tns:AutoplayTypeType" />
      <xs:element name="EnableAutoPlayForRegisteredApps" type ="xs:boolean" default="false" minOccurs="0" />
      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

Remarks

  • The structure for the PackageIdentity and Application elements are identical with the Application Manifest structure, so copy the elements from the application's manifest.

  • In addition to including the AutoplayHandler element in the device metadata, the specified UWP device app must also register for the AutoPlay event by adding a Declaration in its application manifest for the event. AutoPlay recognizes the declaration for the app and then includes it in the list of possible actions that a user can take to respond to that event.

  • Only the package listed in the DeviceCompanionApplications value in the SoftwareInfo.xml file will be downloaded as part of the device installation. If the LaunchApplicationOnDeviceConnect element value is from a different package, Windows does not know whether it will actually be on the user’s device. If the recommended application is not on the user’s device, users will not be presented with the choice.

  • Even if the application is the same as the DeviceCompanionApplications entry, it may not always appear in the AutoPlay list. If the user is not connected to the Internet or otherwise fails to download the companion application, it will not appear in the list. However, when the user gets the application, they will be presented with a “New Option Available” AutoPlay dialog box the next time they connect their device.

The AutoplayHandler element is optional.