15. Background Tasks

Windows Store apps often must perform a variety of tasks even when they are not running in the foreground. Your app might need to fetch data from a remote server, scan directories for changes, or communicate with a web service to retrieve updates. Chapter 2, “Windows Store Apps and WinRT Components,” covers the application lifecycle and explains how apps are suspended and sometimes even terminated when they are not in the foreground. Chapter 10, “Networking,” demonstrated a special background task that can run to download large files even when the app is suspended or terminated.

Your app can use several more types of background tasks. Some of these tasks can drive updates that display for the user on the lock screen, such ...

Get Programming the Windows Runtime by Example: A Comprehensive Guide to WinRT with Examples in C# and XAML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.