Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I start a Modern-UI app and then switch to a different app or a normal program running on the desktop, what happens to the first app? I've heard something about the first app being suspended, but realized that I don't really know that for certain.

I mean, could you write a SETI@Home (BOINC) app if you wanted to, or will apps that aren't in the foreground always be suspended? Can you change that? I could see changing that based on available resources, running from AC vs. battery, etc.

This morning I heard about an iPad being recovered thanks to the "Find my iPad" app, and was wondering whether you could write such a thing as a Modern-UI app and have it work without being the running foreground app. (I'm aware that you'd just write a Windows service or similar, that's not what I'm asking about.)

share|improve this question
1  
The comparison with the Find-my-iOS-device-App is irrelevant; since the iOS vendor (apple) can allow it's iOS Apps whatever it wants. I'm considering to remove it from the question to avoid confusion. What does anyone else think? –  klyonrad Nov 13 '12 at 18:51
    
@klyonrad It was relevant to me as it's the only reason I asked this question to begin with and provides an example of why someone might care in the first place. I would strongly prefer that you leave the question alone. –  Mark Allen Nov 14 '12 at 0:05
add comment

1 Answer

up vote 22 down vote accepted

If I start a Modern-UI app and then switch to a different app or a normal program running on the desktop, what happens to the first app?

The app enters a suspended state — you can check its resources in task manager.

Apps will be suspended when you are not using them, this is for performance. When suspended you won't feel your system 'lag' (ie slowdowns attributed to running an intensive application in the background).

Windows 8 is designed to keep in mind that when any background app is not active, it should not use much CPU, so your system performs well in the active app.

Any Metro style app is in one of 4 lifecycle states at any given time:

  • Not Running
  • Running
  • Suspended
  • Terminated

As the app transitions between states, it receives lifecycle events that help provide a consistent and high performance experience to the user.

enter image description here

There are some MSDN blogs which can help you to implement what you want to.

Managing app lifecycle so your apps feel "always alive"

Being productive when your app is offscreen

Being productive in the background – background tasks

share|improve this answer
1  
Why is downvote? Please care to comment so I could improve the post. –  avirk Nov 9 '12 at 3:50
3  
@thetechfreak they will continue download without suspend, Windows is using a BackgroundDownloader which will not pause the download when your app is not in foreground. Also you can download/upload without any interruption when your app is not in foreground. –  avirk Nov 9 '12 at 12:52
1  
I especially appreciate the links - I feel much better about modern-ui apps now. –  Mark Allen Nov 9 '12 at 19:26
2  
+1 Great answer, clarified & edited grammar! –  HaydnWVN Nov 14 '12 at 9:14
1  
@HaydnWVN don't worry! Edit 500 posts will be a gold. :) –  avirk Nov 19 '12 at 15:01
show 8 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.