DeviceCapability (package schema for Windows 8)

Declares a device capability required by a package.

Element hierarchy

<Package>
<Capabilities>
<DeviceCapability>

Syntax

<DeviceCapability Name = A string between 1 and 50 characters in length or a GUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. />

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
Name

The name of the device capability, either specified as a friendly name or a device interface class GUID.

A string between 1 and 50 characters in length or a GUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Yes

 

Child Elements

None.

Parent Elements

Parent Element Description
Capabilities

Declares the access to protected user resources that the package requires.

 

Remarks

If the Name attribute is specified as a GUID, then it is validated as GUID.

By default, UWP apps have access to print, scanner, and sensor devices. To access other types of devices, you must specify them using a DeviceCapability element. Some device capabilities must be added to the package manifest manually. For more info, see How to specify device capabilities in a package manifest.

For more info about capability declarations, see App capability declarations.

Some device capabilities require child elements. This table lists device capabilities by name or GUID and specifies if any child elements are required.

Device capability Description
bluetooth.genericAttributeProfile Provides access to APIs in the Windows.Devices.Bluetooth.GenericAttributeProfile namespace. This capability requires child elements. For more info, see How to specify device capabilities for Bluetooth.
bluetooth.rfcomm Provides access to APIs in the Windows.Devices.Bluetooth.Rfcomm namespace. This capability requires child elements. For more info, see How to specify device capabilities for Bluetooth.
humaninterfacedevice Provides access to APIs in the Windows.Devices.HumanInterfaceDevice namespace. This capability requires child elements. For more info, see How to specify device capabilities for HID.
location Provides access to the user's current location.
microphone Provides access to the microphone's audio feed.
pointOfService Provides access to Point of Service (POS) barcode scanners and magnetic stripe readers, via the Windows.Devices.PointOfService namespace. These APIs are not supported on Windows Phone.
proximity Required for near-field communication (NFC) between devices in close proximity. Near-field proximity may be used to send files or connect with an app on a proximate device.
serialcommunication Provides access to APIs in the Windows.Devices.SerialCommunication namespace. For more information about defining this capability in the manifest, see the Windows.Devices.SerialCommunication namespace page.
usb Provides access to APIs in the Windows.Devices.Usb namespace. This capability requires child elements. For more info, see Updating the app manifest package for a USB device.
webcam Provides access to the camera's video feed.
Other devices (represented by GUIDs) Includes specialized devices and Windows Portable Devices.

 

Examples

Here's an example of aCapabilities node. For more examples, see How to specify device capabilities in a package manifest.

<Capabilities>
  <Capability Name="internetClient"/>
  <Capability Name="musicLibrary"/>
  <Capability Name="videosLibrary"/>
  <DeviceCapability Name="microphone"/>
  <DeviceCapability Name="webcam"/>
</Capabilities>

See also

App capability declarations

How to specify device capabilities in a package manifest

Requirements

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