Launching, resuming, and background tasks
[ 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.
|App lifecycle||Learn about the life cycle of a UWP app and what happens when Windows launches, suspends, and resumes your app.|
|Handle app prelaunch||Learn how to handle app prelaunch.|
|Handle app activation||Learn how to handle app activation.|
|Handle app suspend||Learn how to save important application data when the system suspends your app.|
|Handle app resume||Learn how to refresh displayed content when the system resumes your app.|
|Free memory when your app moves to the background||Learn 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.|
the Launch an app with a URI section details how to use a Uniform Resource Identifier (URI) to launch one app from another app.
|Launch the default app for a URI||Learn 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 activation||Learn how to register an app to become the default handler for a Uniform Resource Identifier (URI) scheme name.|
|Launch an app for results||Learn 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 scheme||This 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 app||Learn 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 app||This 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 app||Learn how to launch the Windows Maps app from your app.|
|Launch the People app||This 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 handlers||Drive 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.
|Launch the default app for a file||Learn how to launch the default app for a file.|
|Handle file activation||Learn how to register your app to become the default handler for a certain file type.|
See other topics related to launching an app below.
|Reserved file and URI scheme names||This topic lists the reserved file and URI scheme names that are not available to your app.|
|Auto-launching with AutoPlay||You 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.|
The App services section describes how to integrate app services into your UWP app to allow the sharing of data and functionality across apps.
|Create and consume an app service||Learn 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 app||Convert app service code that ran in a separate background process into code that runs inside the same process as your app service provider.|
The Background tasks section shows you how to make lightweight code run in the background in response to triggers.
|Access sensors and devices from a background task||DeviceUseTrigger lets your Universal Windows app access sensors and peripheral devices in the background, even when your foreground app is suspended.|
|Guidelines for background tasks||Ensure your app meets the requirements for running background tasks.|
|Create and register an out-of-process background task||Create 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 task||Create 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 task||Learn 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 task||Learn how to debug a background task, including background task activation and debug tracing in the Windows event log.|
|Declare background tasks in the application manifest||Enable the use of background tasks by declaring them as extensions in the app manifest.|
|Handle a cancelled background task||Learn 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 completion||Learn how your app can recognize background task progress and completion.|
|Register a background task||Learn how to create a function that can be re-used to safely register most background tasks.|
|Respond to system events with background tasks||Learn how to create a background task that responds to SystemTrigger events.|
|Run a background task on a timer||Learn how to schedule a one-time background task, or run a periodic background task.|
|Set conditions for running a background task||Learn how to set conditions that control when your background task will run.|
|Transfer data in the background||Use the background transfer API to copy files in the background.|
|Update a live tile from a background task||Use a background task to update your app's live tile with fresh content.|
|Use a maintenance trigger||Learn how to use the MaintenanceTrigger class to run lightweight code in the background while the device is plugged in.|
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.
|Discover remote devices||Learn how to discover devices that you can connect to.|
|Launch an app on a remote device||Learn how to launch an app on a remote device.|
|Communicate with a remote app service||Learn how to interact with an app on a remote device.|
The Splash screens section describes how to set and configure your app's splash screen.
|Add a splash screen||Set your app's splash screen image and background color.|
|Display a splash screen for more time||Display 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.|