PhoneApplicationService.ApplicationIdleDetectionMode Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets whether application idle detection is enabled.
Namespace: Microsoft.Phone.Shell
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.
Syntax
Public Property ApplicationIdleDetectionMode As IdleDetectionMode
public IdleDetectionMode ApplicationIdleDetectionMode { get; set; }
<object ApplicationIdleDetectionMode="IdleDetectionMode" .../>
Property Value
Type: Microsoft.Phone.Shell..::.IdleDetectionMode
Type: IdleDetectionMode.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | ApplicationIdleDetectionMode cannot be enabled after it has been disabled. -or- ApplicationIdleDetectionMode cannot be set until the application’s PhoneApplicationFrame object has been initialized. |
Remarks
Important Note: |
---|
This Windows Phone feature has certification requirements that must be met for an application to be eligible for listing in the Windows Phone Store. You should consider these requirements as you design and test your application. For more information, see App certification requirements for Windows Phone. |
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 because 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 about using this feature, see Idle detection for Windows Phone 8.
Note
The XAML usage of this property is not supported.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0
Platforms
Windows Phone