Using BackgroundTask in Universal Windows Platform applications
This recipe walks you through the process of creating a background task in a Universal Windows Platform application, which updates the application's live tile on a desktop.
Getting ready
To go through this recipe, you will need Visual Studio 2015 and the Windows 10 operating system. There are no other prerequisites. The source code for this recipe can be found at BookSamples\Chapter11\Recipe3
.
How to do it...
To understand how to use BackgroundTask
in Universal Windows Platform applications, perform the following steps:
- Start Visual Studio 2015. Create a new C# Blank App (Universal Windows) project under
Windows\Universal
folder. If you need to enable the Windows 10 developer mode, refer to the Using a timer in a Windows Store application recipe for detailed instructions. - Open the
Package.appxmanifest
file. In the Declarations tab, add Background Tasks to Supported Declarations. Under Properties, check the supported properties...