imageSo the Windows Phone reviews are coming out and I keep reading complaints that the apps have to restart when the phone is unlocked. That complaint is confused for a lack of multitasking. Not the case. By default Microsoft has set a line of code to deactivate idle applications and the OS will detect an idle application if the lock screen is disabled unless the dev changes one line of code:

When application idle detection is enabled, the operating system will deactivate idle applications. Disabling application idle detection requests that the operating system not perform this service. This feature should be used with caution as applications that run while the phone is locked continue to drain the device’s battery. In this case, the user may not realize that the application is running because the screen is off and the phone looks idle.

In the current release, an application is considered to be idle if the user has allowed the phone to lock. In future releases, the conditions that qualify an application as idle may change. Even if application idle detection is disabled, the operating system may deactivate an application for other reasons, such as a depleted battery. For more information on using this feature, see Idle Detection for Windows Phone.

Here are the details from MSDN for devs to use to disable app idle detection.

The MS certification requirements cover this as well:

6.3 Applications Running under a Locked Screen
An application in the foreground can continue to run when the phone screen is locked by setting the PhoneApplicationService.ApplicationIdleDetectionMode property.
An application that is running under a locked screen must meet the following requirements:
6.3.1 Configurable Functionality
In the UI or settings menu, an application must provide the user with the ability to prevent the application from running under a locked screen.
6.3.2 Launch Configuration of Running under a Locked Screen
On first use of ApplicationIdleDetectionMode, an application must ask the user for explicit permission to run under a locked screen.
Microsoft recommends that these applications minimize power usage as much as possible while running under a locked screen.

In other words, if an app needs to restart after the lock screen is enabled, the dev needs to be asked to change the code. So don’t blame the OS or the phone. This is done to protect battery life so apps don’t run in the background and some apps that should continue to run in the background can take advantage of this. It is not a multitasking limitation though.


  1. Oh thank god this problem was actually starting to worry me as I read all the reviews that went up last night. Thanks for the clear up MobilityDigest!

  2. The crucial question is, will developers actually make this change? If they didnt do something this trivial in the first place why would they do it now? And how on earth did this get past MS certification? Sounds like a right old balls up all round to me.

  3. “Sounds like a right old balls up all round to me.” – efjay

    At first I thought this, but it makes sense. If by default let’s say the application ran in the background if the user locked the screen and they did their own thing and never returned to the application, there would be a decent hit on the battery life – thus reducing the quality of the user experience with the phone because they’ll believe the phone has a shorter battery life and complain about that instead.

    The same is true with tombstoning your application. If you’re actively in your application, and then you click Windows or search and end up going on a different tangent and your IdleDetection is disabled, then guess what…. Your app is unnecessarily churning in the background while your off telling a life story on facebook etc.

    I will give you this…. It is a little inconvenient to see resuming and the progress bar if you lock the application for a given reason and go back to it in a few moments, but granted the phone is not a mind reader and must assume the possibility that the application will never be restarted during the current battery cycle – then deactivating the application is the logical choice. Again consider the phone application life cycle and the reasons of tombstoning and apply it to a locked screen as opposed to pressing Windows or Search on the phone.

Comments are closed.