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.
The post is about capturing a photo on WinRT devices (of course those with camera). The presented method uses MediaCapture class. Althought it was tested on Windows Phone 8.1 Runtime, it should also work fine on other devices.