Step 1: Create a Windows Store device app (Windows 8.1)
This topic describes the basic process for creating a Windows Store device app for Windows 8.1 by using Microsoft Visual Studio 2013. Learn about the tasks that are common to all Windows Store device apps.
A Windows Store device app is a special kind of Windows Store app that device manufacturers create to serve as a companion to their internal or peripheral device. By using device metadata, device apps can run privileged operations and automatically install when a device is plugged in. For more info about Windows Store device apps, see Meet Windows Store device apps.
Note This topic is part of a step-by-step series. See Build a Windows Store device app step-by-step for the introduction.
This step-by-step guide assumes that you've created a Windows Store app project and that any necessary device drivers already exist.
Before you can begin, you need to have installed Visual Studio 2013 and created a Windows Store app project. If you haven't done that yet, you can download the tools here. To get started with Microsoft Visual Studio, see Develop Windows Store apps using Visual Studio.
Some Windows Store device app and APIs require that your device supports a Microsoft-supplied driver or that your driver supports a specific driver model. This table lists the driver requirements for some device apps and APIs.
|Device app or API||Driver info|
|Windows Store device apps for camera||Your camera’s driver must use the AvStream driver model. For more info on the AvStream driver model, see the AVStream Overview in the Windows Driver Kit. A an additional component, known as the Driver MFT (a media foundation transform), can be supplied with the driver installation package to provide custom effects for the camera. For more info, see Windows store device apps for cameras.|
|Windows Store device apps for printers||Printers must use the v4 Printer driver. See Developing the v4 print driver for more info.|
|USB APIs||To use the Windows Runtime Windows.Devices.Usb APIs, your device must be compatible with the Winusb.sys driver.|
|Human Interface Device (HID) APIs||The HID APIs are designed for use over USB, Bluetooth, Bluetooth Smart, and the I2C transports. To use the Windows Runtime Windows.Devices.HumanInterfaceDevice APIs, your device must be compatible with the HIDClass.sys driver and the driver required by the transport. For more info, see HID Architecture.|
|Bluetooth GATT APIs||To use the Windows Runtime Bluetooth GATT APIs, Windows.Devices.Bluetooth.GenericAttributeProfile, your device must be compatible with the BthLEEnum.sys driver.|
|Bluetooth RFCOMM APIs||To use the Windows Runtime Bluetooth RFCOMM APIs, Windows.Devices.Bluetooth.Rfcomm, your device must be compatible with the Rfcomm.sys and BthEnum.sys drivers.|
Important Device access using custom drivers requires approval from Microsoft. OEMs and IHVs that want to implement device access for a specialized device using a custom driver should first contact their Microsoft contact to discuss their scenario with the Windows Ecosystem team. For more info, see the Custom Driver Access Model section in the Windows Store device app design guide for specialized devices internal to the PC.
A developer account on the Windows Store is required. You’ll need the publisher name when you author the app manifest and the device metadata in later steps. You can also reserve a name for your app once you've created a store profile.
To create a Windows Store account, go to the Windows Store apps sign up page and click Sign up now.
When you enter the publisher display name, enter the name under which your apps should be listed in the Windows Store. You won't be able to change this name until your account verification is complete. Pick the name carefully, as customers will see this name when browsing and will come to know your apps by this name.
After you've created a Windows Store account and selected a publisher name, associate your app with the Windows Store. Doing so will automatically download the following values to your local app package manifest file, named Package.appxmanifest.
Package display name
Publisher display name
If you've already developed device metadata, after you associate the app with the Windows Store, you'll need to update the device metadata with the values from the app manifest.
To associate your app with the Windows Store
In Solution Explorer, right-click your project and then select Store > Associate App with the Store.
In the Associate Your App with the Windows Store dialog box, click Next. You'll be prompted to sign in to the Windows Store.
On the Sign In page, sign in to the Windows Store and then click Next.
On the Select an app name for this package page, select the App Name you have reserved. You can also click Reserve Name to go to the Windows Store to reserve one.
After an app name is selected, click Next.
On the summary page, review the values that you have selected. If it looks good, click Associate. Otherwise, click Previous to go back and fix any errors. Clicking Associate automatically downloads the publisher display name and other values into the app package manifest.
After you associate your app with the Windows Store, review your app's package manifest to see that the publisher display name and other values were inserted as expected. Ensure that the app title and name demonstrate a strong connection to the device. Also note that only one app is allowed in the app package.
To review the app package manifest
In Solution Explorer, double-click the package.appxmanifest file. This opens the Manifest Designer. The Manifest Designer is a graphical UI for the underlying XML file.
After the file opens in Manifest Designer, click the Packaging tab to see the Package and Publisher information.
To see the same information in XML, right-click package.appxmanifest and select Open With > XML (Text) Editor.
Take note of your Package Name, Publisher Name, and App ID. You'll need them for the next step, Step 2: Create device metadata.
While you're reviewing the app package manifest with the Manifest Designer, choose a publisher certificate that matches the Publisher name in the manifest. While the Manifest Designer is open on the Packaging tab, click Choose Certificate to select the appropriate certificate.
As you begin developing your Windows Store device app, consider the following points.
To access your device, you might need to specify a device capability in the app package manifest. These are specified with the DeviceCapability element of the Package.appxmanifest file in your app's project. Note that some device capabilities must be specified manually. For more info, see How to specify device capabilities in the package manifest.
AutoPlay starts your app by default when your device is plugged in. To use this feature, you'll need to edit the app package manifest and the device metadata. For more info, see AutoPlay for Windows Store device apps.
You can sync or update your device from a Windows Store device app by using device background tasks. To use this feature, you'll need to specify your app as a privileged app in the device metadata. For more info, see Device sync and update for Windows Store device apps.
|Windows Store device apps for printers||Display printer status and extend the print settings experience. Starting in Windows 8.1, your app can also manage print jobs and perform printer maintenance.|
|Windows Store device apps for cameras||Extend the camera options experience. Your app can also provide custom effects with a Driver MFT.|
|Windows 8.1: New APIs and features||Learn about Windows Runtime APIs for USB, HID, Bluetooth GATT, Bluetooth RFCOMM, Scanning, and more, that were introduced in Windows 8.1.|
|Windows Store device apps for internal devices||Lean how OEMs can write device apps for devices internal to the PC.|
To give your app the best chance of getting certified, validate and test it on your computer before you submit it for certification and listing in the Windows Store. For more info, see Windows App Certification Kit.
Build date: 11/16/2013