As your customers move your app between the foreground and background, Windows manages your app’s usage of critical system resources. Come learn the fundamentals of Process Lifetime Management and how to structure your app to suspend and resume quickly, save app state properly, and behave consistently. We will also highlight ways to keep your app fresh using push notifications and tile interactivity. Understanding these critical concepts will help you deliver a continuous experience that customers expect.

Very good session. I got a better understanding of the fundamentals of the Metro style apps.

I have a question regarding the suspended state. Is it only Metro style apps using the new WINRT that will be suspended or does this relate also to every application running under the previous windows runtimes?

I agree, this session really raised my awareness as to how and when Metro Apps run. Ben also convers how to save state and provides best practices on how to do so. Live Tiles and Lock Screen info was valuable too.

I have noticed a problem with getting Suspended. If an application is playing music and it takes about 5 seconds to get suspended you get 5 more seconds of the music playing in the background (or longer if it takes longer for the app to get suspended). This is really strange. Same for playing a movie and switching await. The movie keeps playing for a bit before it knows it is getting suspended.

Also, what if a user really want to terminate/close an application and loose its state? Sometimes you just write something or start something know you are doing it wrong and close it (at least for desktop apps). Does a developper now have to create a 'reset' button on the app? Or does the user need to be fast and end the app in task manager before it get suspended indicating a crash?

Hi, regarding your example where a music app would keep playing for 5 seconds after the suspension call, I think you are a little confused. The call to suspend the app will be sent immediately. The app will then have 5 seconds to finalize things before it is suspended. In case of a music player that should be less than a second. The app will then be suspended before the 5 seconds are up. The 5 seconds are just a safeguard so that an app can't take like 30 seconds to be suspended. Most apps will be a lot quicker and will not need the full 5 seconds. If you would like to terminate an app just click the red X like you always do. An app is only suspended when your app loses focus. As far as resetting options, most apps have the option to reset to defaults so yes that will rely on the developer, and to terminate an app and lose its 'state' just click the red X. Hope this is helps clear up some confusion.

Regarding to the music still playing I was talking about something I experienced on the dev preview build of Windows 8 running in a VM. I started the Piano app and loaded a song into it, navigating to the start menu did not immediately stop the music but it kept running for 5 or even more seconds.

However, knowing the suspended call happens immediately it caused me to think this might have been a bug or slow reaction because of the visualization.

Remove this comment

Remove this thread

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums, or
Contact Us and let us know.