Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DeviceCapability

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

AttributeDescriptionData typeRequiredDefault 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 ElementDescription
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, Windows Store 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 capabilityDescription
locationProvides access to the user's current location.
microphoneProvides access to the microphone's audio feed.
proximityRequired 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.
webcamProvides access to the webcam's video feed.
usbProvides 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.
humaninterfacedeviceProvides 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.
bluetooth.genericAttributeProfileProvides 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.rfcommProvides 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.
pointOfServiceProvides access to Point of Service (POS) barcode scanners and magnetic stripe readers, via the Windows.Devices.PointOfService namespace.
Other devices (represented by GUIDs)Includes specialized devices and Windows Portable Devices.

 

Examples

Here's an example of a Capabilities 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

Namespace

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

 

 

Show:
© 2014 Microsoft. All rights reserved.