Windows 10 Universal Apps to Run in the Background with no Agents Needed
Background processes in Windows Phone, and Windows 10 Mobile had always utilized a model where the main code was never allowed to run in the background, but a separate background agent which could poll, send notifications and anything that the app needed. The problem with the model had an impact both on consumers and developer.
For consumers notification became haunting with double the work because of the separate process, while for developers the restrictions to run under very specific time, and with constant on processor cycle utilisation, the end result wasnt effective as it should have been. Microsoft seems to have enough feedback about it, and is introducing a “No Agent” mode for Universal Apps where the main code can run in the background. This is made possible via the Redstone or the Anniversary Update coming this summer.
In an official blog post from the Microsoft Developer Blog, they explained:
Interested in running your application in the background? A new developer option available in the Windows 10 Anniversary Update just made background activity a whole lot easier. Your feedback was clear on the multiple process model: while doing background work in a separate process was more resilient, it required significantly more code to implement. From this feedback we are able to provide a new option, a simplified method for enabling background activity without creating a background task. Now developers have the choice of running code in the background as either a separate process or directly inside the foreground application. We’ll cover the basics for all the tools which utilize the single process model:
- Background Triggers
- App Services
- Background media playback using Activity Sponsored Execution.
- Extended Execution
The single process model enhances the application lifecycle with improved notifications for when your app is in the foreground or in the background. Two new events are available from the Application object for these transitions: EnteredBackground and LeavingBackground. These events fit into the application lifecycle based on the visibility state of your application.
This in brief means, that developers who adopt the universal model, will be able to deliver better experience to consumers, have less code to manage, and do things more seamlessly i.e. no double attention problem.

