Standard vs. Service Applications
Microsoft Surface includes the following types of applications:
- Attract application The Attract application is configurable by the system administrator and is designed to attract users to a device made for Surface. The Attract application runs only in Surface Shell on a device made for Surface.
- Standard Applications Standard applications appear in Launcher as users continue to interact with Surface Shell.
- Service Applications Service applications run in the background and do not have user interfaces or appear in Launcher. Unlike standard applications, service applications persist across user sessions.
When you deploy an application, you must define whether the application is a standard application or a service application in the application's XML file. For more information about how to deploy an application, see Deploying Surface Applications.
Standard Applications
Standard applications are the applications that have a user interface that users interact with. Standard applications are displayed over the entire Surface screen. (You cannot change the size of the application display.) Only one application appears at a time, but multiple applications can run at the same time.
Tip |
|---|
| You can also run standard applications on a Windows 7 computer. However, all the features of the Surface environment, such as Surface Shell, will not be available. For more information, see Devices Made for Surface vs. Windows Touch Computers. |
Registering Standard Applications
Each standard application is registered in its own XML file in the %PROGRAMDATA%\Microsoft\Surface\v2.0\Programs folder. A standard application's registration XML file contains an <Application> element. For more information about the registration XML file for Surface applications, see Registering Standard Applications.
Starting Standard Applications
When a device made for Surface enters Surface Mode, Surface starts Surface Shell. When a user touches the center access point in the Attract application, Launcher appears and displays all of the registered standard applications. A standard application starts when a user touches the application icon in Launcher, and ends when the user session ends.
Service Applications
You can use Surface to develop service applications that can run in the background and interact with the Surface Shell component on a device made for Surface. A service application does not provide a user interface.
For example, a service application can initiate user notifications (for example, about a print job that is complete or network messages that are received). A user notification can also give a user the option of starting a different application. You might also want to use service applications for continuous media operations or system monitoring.
Security Note |
|---|
| Because service applications persist across Surface Shell sessions (user sessions), you must make sure that previous user information is not exposed to subsequent users. |
Registering Service Applications
Each service application is registered in its own XML file in the %PROGRAMDATA%\Microsoft\Surface\v2.0\Programs folder, just like standard Surface applications. A service application's registration XML file contains a <ServiceApplication> element instead of an <Application> element. For more information about the registration XML file for service applications, see Registering Service Applications.
Starting Service Applications
Surface starts service applications differently than other applications.
When a device made for Surface enters Surface Mode, Surface starts all registered service applications. When Surface starts a service application, it runs the process without a console window so that the UI suppression functionality does not stop the service application. If a service application tries to run a GUI window, Surface stops the application.
Note |
|---|
| Service applications can display a GUI in Windows Mode for testing and debugging purposes. |
Service applications persist across user sessions. If a service application has user information, such as name or hotel room number, that information might be revealed to other users. A service application can subscribe to the SessionEnded event to know when to clean up any personal data before the next user starts an experience.
Monitoring Service Applications
Surface monitors service applications for failures (crashes) and restarts service applications if they crash or exit with a non-zero exit code. By default, the platform waits 10 seconds before it restarts a service application. You can change this delay through the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Surface\v2.0\Global\Shell\ServiceApplicationRestartDelay registry value.
There is no limit on the number of times that Surface can restart a service application.
Surface does not restart services if they exit normally (with an exit code of zero), and it does not monitor if service applications stop responding (hang).
© Microsoft Corporation. All rights reserved.
Tip
Security Note
Note