Chapter 3. Fast application switching and resume

 

This chapter covers

  • Fast application switching
  • Responding to lifetime events
  • Fast application resume

Like any other operating system, an application on the Windows Phone starts up, runs for a while, and in the normal course of things, eventually exits. In other multitasking operating systems, an application can be moved to the background when the user switches applications. While in the background, the application will continue to run in lower-priority time slices. The Windows Phone OS is a multitasking operating system, but puts limitations on background operations. When a user switches applications, the running application is paused, and system resources are disconnected from the process so they can be freed up for foreground applications. A dormant application might eventually be terminated if the operating system needs to allocate additional resources to the foreground application.

Applications can’t run in the background, but Windows Phone offers several options for the developer to build applications that require multitasking features. Fast application switching and fast application resume provide dormant applications the tools for quickly returning to full operation, giving the user the impression that the application continued to run. Background agents, covered in chapter 4, provide the mechanisms applications use to perform tasks even when applications aren’t running.

3.1. Fast application switching

3.2. Launching the application

3.3. Switching applications

3.4. Out of sight

3.5. Fast application resume

3.6. Summary