If you are part of DVLUP program of Nokia, you might have noticed that, all Windows Phone 8 challenges have the same requirement “Employ Fast App Switching”. This is more likely same as “Fast App Resume”. So, what is this and how can you configure your app to support fast app resume?

 

In this small post for WPDev, we will discuss a bit about it and the simple process to configure your WP8 apps and/or games to process “Fast App Resume”.


What is “Fast App Switching”?

In Windows Phone 8, when the user navigates away from an application, the app goes into suspended state and the state preserves in memory by the operating system. If the user returns back to the app by pressing the hardware “back” button or by using the Task Switcher, the app instance resumes immediately. The app quickly resumes to the same state it was when the user navigated away because it was preserved in memory by the operating system. This process is called Fast App Switching or FAS.

 

Let’s assume, the user opens an app which loads the “MainPage.xaml” by default. Then the user navigates to another page named “SecondaryPage.xaml” and then he presses the Start button to do some other operations with his device. The app then goes to suspended state. Now he presses the back button or uses the task switcher to navigate back to the app. In this case, he will come back to the “SecondaryPage.xaml” where he was working before the app moved to suspended state.

 

What is “Fast App Resume”?

In Windows Phone 8, when the user navigates away from an application, the app goes into suspended state and the state preserves in memory by the operating system. If the user re-launches the app by tapping on the app’s primary tile from the Start Screen or the app name in the app list, the old instance of the app terminates by default and a new instance of the app generates. Windows Phone 8 introduces an ability for apps to request that user actions to re-launch the app to resume the suspended instance of the suspended if exists. This process is called Fast App Resume or FAR.

 

Let’s assume the user opens an app which loads the “MainPage.xaml” by default. Then the user navigates to another page named “SecondaryPage.xaml” and then presses the Start button to do some other operation with his device. The app goes to suspended state. But this time to come back again to the app, the user taps on the Start Screen tile or the app name in the app list instead of pressing the back button or the task switcher. Unlike to “Fast App Switching”, the app will not resume from the suspended state but will create a new instance to replace the previous one. Thus it goes thru the whole process of new app start and take time to load. Windows Phone 8 SDK provides a way to handle this and ask the app to resume from the suspended state which you needs to configure in your app to support Fast App Resume.

 

How to configure your WP8 to support “Fast App Resume”?

The process to enable “Fast App Resume” is very easy. If you want to enable Fast App Resume for your app, add the ActivationPolicy attribute to the DefaultTask element in the “WMAppManifest.xml” file by opening it in any XML file editor or notepad and set the value to “Resume” as shown below:

 

Fast App Resume configuration in app manifest file

 

That’s it! Now your Windows Phone 8 will support “Fast App Resume”. Now when the user taps the tile of the suspended app, it will just resume the app instead of creating a new instance.

 

I hope, this will give you a head start configuring your app/game to employ fast app switching and fast app resuming. Check out my other blog posts for more on Windows Phone and Windows 8 Store app development. Don’t forget to subscribe to my blog to get the regular article updates. I am also available on Twitter and Facebook. If you are using those, connect with me.

Have a question? Or, a comment? Let's Discuss it below...

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.