Partager via


Guidelines for developing Windows Store apps for Windows Embedded (Industry 8.1)

7/8/2014

Review the guidelines for developing a Windows Store app for an Windows Embedded 8.1 Industry (Industry 8.1) device.

You can create Windows Store apps for Windows Embedded 8.1 Industry (Industry 8.1) by using the same methods and tools that you use to create apps for Windows 8.1. For more information about developing Windows Store apps, see Windows 8 app development. The following topic provides guidelines for developing specialized Windows Store apps that take advantage of features that are available in Windows Embedded 8.1 Industry (Industry 8.1) but are not available in Windows 8.1, such as Windows 8 Application Launcher.

Tools

You must use Visual Studio 2012 to create your Windows Store app.

Exit a Windows Store app

When Windows or a user exits a Windows Store app, Windows sends a Suspending | suspending event to the app before exiting the app. If your app has registered an event handler for the suspend event, your app can inspect the ApplicationExecutionState to detect if and how the app is exited. Generally, Windows Store apps do not return an exit code when they are exited, whether by the user or by Windows.

For more information about the Windows Store app lifecycle, see Application lifecycle.

Return an exit code

To simulate an exit code value, your app can write a local application data setting, CustomExitCode, before exiting. We recommend that you clearly document these exit code values.

Windows 8 Application Launcher inspects the local application data store for the CustomExitCode setting to determine the exit code for the Windows Store app.

The following sample code shows how you can write this in a Windows Store apps built by using C#:

var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;

localSettings.Values[“CustomExitCode”] = 1;

The following sample code shows how you can write this in a Windows Store app built by using JavaScript:

var applicationData = Windows.Storage.ApplicationData.current; 
var localSettings = applicationData.localSettings; 

localSettings.values["CustomExitCode"] = 1;

Application self-exit

Your app can also exit itself. Windows 8.1 treats this as an application crash. In these cases, we recommend that your app write the CustomExitCode value right before it exits.

Warning

If your Windows Store app includes any UI elements that enable a user to exit the app, the app cannot be certified by the Windows Store.

The following sample code shows how your app can forcibly exit itself in a Windows Store app built by using C#:

Application.CurrentExit();

The following sample code shows how your app can forcibly exit itself in a Windows Store app built by using JavaScript:

MSApp.terminateApp();

Identify the Application User Model ID (AUMID)

Industry 8.1 features that work with Windows Store apps use the Application User Model ID (AUMID) to identify the app. If you are an independent software vendor (ISV), you must provide the AUMID of your app to the OEM or system administrator configuring the Industry 8.1 device.

The AUMID format is the package family name followed by an exclamation point and the application ID. The application ID can be found in the AppxManifest.xml file, under the <Applications> element.

To find the AUMID of an installed app, see Find the Application User Model ID of an installed app.

See Also

Concepts

Windows 8 Application Launcher