Fast Application Switching in the "Tidy" application
Fast Application Switching (FAS) allows applications to stay dormant (in memory) after deactivation. By detecting whether your application is being activated from a dormant state instead of a tombstoned state, you can optimize it to have quicker resume times. This lab will show you how to use the ActivatedEventArgs parameter in the application life-cycle events to the test whether or not your application instance was preserved using FAS.
The original Windows® Phone operating system had each application that was not currently active tombstoned, which essentially meant its state was serialized and kept in the application’s isolated storage. Were the user to return to the tombstoned application, he would have to wait a while as the application deserialized its state and recovered.
With Windows® Phone Codenamed Mango that is no longer the case. Once an application is sent to the background the operating system keeps its image alive in memory for as long as possible without impairing the performance of the currently active application. Should the user reactivate the application, the experience would be virtually instantaneous as restoring the application’s in-memory image is a fast operation.
This new mechanism is called Fast Application Switching (FAS) and in this lab we show how to be aware of the manner in which your application was restored after being deactivated. Knowing whether your application’s image was preserved will allow you to perform the necessary operations to recover the application’s state, and this lab will demonstrate how to perform this distinction using the Tidy application.
This lab provides instructions to help you achieve the following:
The following prerequisites are required to gain the most can be gained from this hands-on lab: