Table of contents
TOC
Collapse the table of content
Expand the table of content

Launching, resuming, and background tasks

Last Updated: 12/2/2016

[ Updated for UWP apps on Windows 10. For Windows 8.x articles, see the archive ]

This section includes information on the following:

  • What happens when a Universal Windows Platform (UWP) app is started, suspended, resumed, and terminated.
  • How to launch apps by using a URI or by file activation.
  • How to use App services, which allow your Universal Windows Platform (UWP) app to share data and functionality with other apps.
  • How to use background tasks, which allow a UWP app to do work while the app itself is not in the foreground.
  • How to discover connected devices, launch an app on another device, and communicate with an app service on a remote device so that you can create user experiences that flow across devices.
  • How to add and configure a splash screen for your app.

The app lifecycle

This section details the lifecycle of a Windows 10 Universal Windows Platform (UWP) app, from the time it is activated until it is closed.

TopicDescription
App lifecycleLearn about the life cycle of a UWP app and what happens when Windows launches, suspends, and resumes your app.
Handle app prelaunchLearn how to handle app prelaunch.
Handle app activationLearn how to handle app activation.
Handle app suspendLearn how to save important application data when the system suspends your app.
Handle app resumeLearn how to refresh displayed content when the system resumes your app.
Free memory when your app moves to the backgroundLearn how to reduce the amount of memory that your app uses when it is in the background state so that it won't be terminated.

Launch apps

the Launch an app with a URI section details how to use a Uniform Resource Identifier (URI) to launch one app from another app.

TopicDescription
Launch the default app for a URILearn how to launch the default app for a Uniform Resource Identifier (URI). URIs allow you to launch another app to perform a specific task. This topic also provides an overview of the many URI schemes built into Windows.
Handle URI activationLearn how to register an app to become the default handler for a Uniform Resource Identifier (URI) scheme name.
Launch an app for resultsLearn how to launch an app from another app and exchange data between the two. This is called launching an app for results.
Choose and save tones using the ms-tonepicker URI schemeThis topic describes the ms-tonepicker URI scheme and how to use it to display a tone picker to select a tone, save a tone, and get the friendly name for a tone.
Launch the Windows Settings appLearn how to launch the Windows Settings app from your app. This topic describes the ms-settings URI scheme. Use this URI scheme to launch the Windows Settings app to specific settings pages.
Launch the Windows Store appThis topic describes the ms-windows-store URI scheme. Your app can use this URI scheme to launch the Windows Store app to specific pages in the Store.
Launch the Windows Maps appLearn how to launch the Windows Maps app from your app.
Launch the People appThis topic describes the ms-people URI scheme. Your app can use this URI scheme to launch the People app for specific actions.
Support web-to-app linking with app URI handlersDrive user engagement with your app by using app URI handlers.

The Launch an app through file activation section details how to set up your app to launch when a file of a certain type is opened.

TopicDescription
Launch the default app for a fileLearn how to launch the default app for a file.
Handle file activationLearn how to register your app to become the default handler for a certain file type.

See other topics related to launching an app below.

TopicDescription
Reserved file and URI scheme namesThis topic lists the reserved file and URI scheme names that are not available to your app.
Auto-launching with AutoPlayYou can use AutoPlay to provide your app as an option when a user connects a device to their PC. This includes non-volume devices such as a camera or media player, or volume devices such as a USB thumb drive, SD card, or DVD.

App services

The App services section describes how to integrate app services into your UWP app to allow the sharing of data and functionality across apps.

TopicDescription
Create and consume an app serviceLearn how to write a Universal Windows Platform (UWP) app that can provide services to other UWP apps and how to consume those services.
Convert an app service to run in the same process as its host appConvert app service code that ran in a separate background process into code that runs inside the same process as your app service provider.

Background tasks

The Background tasks section shows you how to make lightweight code run in the background in response to triggers.

TopicDescription
Access sensors and devices from a background taskDeviceUseTrigger lets your Universal Windows app access sensors and peripheral devices in the background, even when your foreground app is suspended.
Guidelines for background tasksEnsure your app meets the requirements for running background tasks.
Create and register an out-of-process background taskCreate and register a background task that that runs in a separate process from your app, and register it to run when your app is not in the foreground.
Create and register an in-process background taskCreate and register a background task that runs in the same process as your foreground app.
Convert an out-of-process background task to an in-process background taskLearn how to convert an out-of-process background task into an in-process background task that runs in the same process as your foreground app.
Debug a background taskLearn how to debug a background task, including background task activation and debug tracing in the Windows event log.
Declare background tasks in the application manifestEnable the use of background tasks by declaring them as extensions in the app manifest.
Handle a cancelled background taskLearn how to make a background task that recognizes cancellation requests and stops work, reporting the cancellation to the app using persistent storage.
Monitor background task progress and completionLearn how your app can recognize background task progress and completion.
Register a background taskLearn how to create a function that can be re-used to safely register most background tasks.
Respond to system events with background tasksLearn how to create a background task that responds to SystemTrigger events.
Run a background task on a timerLearn how to schedule a one-time background task, or run a periodic background task.
Set conditions for running a background taskLearn how to set conditions that control when your background task will run.
Transfer data in the backgroundUse the background transfer API to copy files in the background.
Update a live tile from a background taskUse a background task to update your app's live tile with fresh content.
Use a maintenance triggerLearn how to use the MaintenanceTrigger class to run lightweight code in the background while the device is plugged in.

Remote Systems

The Connected apps and devices (Project "Rome") section describes how to use the Remote Systems platform to discover remote devices, launch an app on a remote device, and communicate with an app service on a remote device.

TopicDescription
Discover remote devicesLearn how to discover devices that you can connect to.
Launch an app on a remote deviceLearn how to launch an app on a remote device.
Communicate with a remote app serviceLearn how to interact with an app on a remote device.

Splash screens

The Splash screens section describes how to set and configure your app's splash screen.

TopicDescription
Add a splash screenSet your app's splash screen image and background color.
Display a splash screen for more timeDisplay a splash screen for more time by creating an extended splash screen for your app. This extended screen imitates the splash screen shown when your app is launched, and can be customized.
© 2016 Microsoft