How to add a BackgroundTask

The article shows step by step how to add and run a sample BackgroundTask in your solution. The presented steps are the same for Windows Runtime, Windows Phone 8.1 Silverlight and Windows Phone 8.1 Runtime. As an example the task is run upon a TimeTrigger and sends simple Toast message from the background.