Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Enabling quick resume for Windows Phone apps
This article explains how to quickly resume the Windows Phone 8 application which is put in the background.
Fast app resume for Windows Phone 8 (Dev Center)
Whenever your app loses focus (is put in the background), an instance of the app is saved. This instance is used to resume the app if the user tasks to it from a deep link or returns to it by selecting the back button on the foreground app. However if the user relaunches the app by selecting its icon on the start screen, by default the stored instance is removed and it is started from scratch.
On Windows Phone 8, Fast App Resume is a way to force a relaunch to use the saved instance rather than fully restart the app. This is much faster. This is not enabled by default and you will need to enable it in order to achieve this functionality in your applications.
Enable Fast App Resume
Enabling Fast App Resume is as simple as adding one attribute to an XML element in the manifest file.
- Open WMAppManifest.xml in any editor. (I use notepad++)
- Find the element DefaultTask
- Add the attribute ActivationPolicy="Resume"
You should end up with something that looks like this:
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" ActivationPolicy="Resume"/>
Apart from setting param in WMAppManifest.xml, there's also a bit one needs to do in App.xaml.cs in order to make the 'fast app resume' feature work correctly.A nice working example is available on msdn: Fast app resume example