×
Namespaces

Variants
Actions

Enabling quick resume for Windows Phone apps

From Nokia Developer Wiki
Jump to: navigation, search

This article explains how to quickly resume the Windows Phone 8 application which is put in the background.

See Also
WP Metro Icon WP8.png
Article Metadata
Tested withCompatibility
Platform(s):
Windows Phone 8
Device(s): All
Article
Keywords: Resume, Wake, Background, Tombstone, Restore
Created: sadify (02 Nov 2012)
Last edited: influencer (27 May 2014)

Introduction

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.

  1. Open WMAppManifest.xml in any editor. (I use notepad++)
  2. Find the element DefaultTask
  3. Add the attribute ActivationPolicy="Resume"


You should end up with something that looks like this:

<DefaultTask Name="_default" NavigationPage="MainPage.xaml" ActivationPolicy="Resume"/>

References

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

This page was last modified on 27 May 2014, at 00:39.
221 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×