[Windows Phone] Resuming your app from the Start Screen (or not) Part I

Launching and resuming apps has been greatly improved in Windows Phone 8. In previous versions of the operating system, tapping on a main tile of the app always created a new instance of the app, even though that app was already opened in the background. This frustrated users coming from others platforms such as iOS or Android, in which apps are resumed when tapping on the icon in the home screen. Fortunately, this issue has been addressed and now developers have the possibility to implement what Microsoft calls Fast Resume.

In this first part of the article I will show you how to quickly add support for Fast Resume in your apps. In a second part, I will discuss different scenarios where Fast Resume may be suitable and others where it may not be.

Implementing Fast Resume for you app is very easy. Just right-click WMAppManifest.xml, click Open with, and then choose XML (Text) Editor. In the DefaultTask element, add the ActivationPolicy attribute and set the value to “Resume”.

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

Now when your user taps on the main tile of your app (or on the app list), it will resume a previously opened instance from memory, if available.

I hope you find it useful.

Cheers,

13 comentarios en “[Windows Phone] Resuming your app from the Start Screen (or not) Part I

  1. I have a WP7.1 Project . I upgraded it to WP8 but when I add the code as u mentioned , it gives me the following error
    AppManifest Validation failed. Invalid AppPlatformVersion in WMAppmanifest.xml AviaryDemo

  2. Make sure you just add the ActivationPolicy=»Resume» attribute. The DefaultTask tag is already present in the WMAppManifest.xml. I guess you added the whole line, so it is now duplicated.

  3. done that.Upgraded project from 7.1 to 8.0 !
    The WPManifest Looks like this after that..kindly let me know for some changes here too. I used Properties windows and changed the BUILD platform from 7.1 to 8.0

    ApplicationIcon.png

  4. Pingback: [Windows Phone] Resuming your app from the Start Screen (or not) Part I

  5. Pingback: [Windows Phone] Resuming your app from the Start Screen (or not) Part II « Antares Lair

Deja un comentario