Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your app cannot "really" run in the background. It can hand certain tasks to the operating system, like sending a file, playing music etc. These tasks will be continued by the OS even when your application is not running anymore. But when the user navigates away from your app it basically stops running.</p> <p>What comes closest to running in the background can IMO be achieved using <a href="http://msdn.microsoft.com/en-us/library/hh202942%28v=vs.92%29.aspx" rel="nofollow">background agents</a>. The <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.periodictask%28v=vs.92%29.aspx" rel="nofollow">PeriodicTask</a> lets your application run for about 15 seconds about every 30 minutes.</p> <p>For quite some time (pre-Mango) "running in the background" for WP7 meant <a href="https://blogs.msdn.com/themes/blogs/generic/post.aspx?WeblogApp=jaimer&amp;y=2010&amp;m=11&amp;d=01&amp;WeblogPostName=running-a-windows-phone-application-under-the-lock-screen&amp;GroupKeys=" rel="nofollow">running under the lock screen</a>. This is possible. But again, when the user navigates away from your application it stops running.</p> <p>If you need to talk to your server when the application ends you could do so if it doesn't take long. If I am not mistaken you have <a href="http://blogs.microsoft.co.il/blogs/arik/archive/2011/03/25/ways-to-load-applications-faster-a-windows-phone-recipe.aspx" rel="nofollow">about 10 seconds time</a> when your application is deactivated. If you exceed this limit the OS will kill your app.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload