加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows-phone-7 – UserIdleDetectionMode与ApplicationIdleDet

发布时间:2020-12-14 05:53:52 所属栏目:Windows 来源:网络整理
导读:你如何在UserIdleDetectionMode和ApplicationIdleDetectionMode之间做出选择? MSDN:UserIdleDetectionMode When user idle detection is enabled,the operating system will go into a low power usage state when the user is idle. Disabling this prope
你如何在UserIdleDetectionMode和ApplicationIdleDetectionMode之间做出选择?

MSDN:UserIdleDetectionMode

When user idle detection is enabled,the operating system will go into a low power usage state when the user is idle. Disabling this property requests that the operating system not perform this service. Use this property to disable user idle detection if your application needs to continue running even when the user is not physically interacting with the screen or hardware buttons. Example scenarios include turn-by-turn navigation applications and games that use the accelerometer for input.

This feature should be used with caution. Applications that disable user idle detection will continue to run and consume battery power when the user is not using the phone. It is recommended that applications that disable user idle detection implement their own form of idle detection and enable UserIdleDetectionMode when appropriate. For example,an accelerometer-based game could enable user idle detection if the accelerometer shows no activity for a period of time.

In the current release,the operating system considers the user to be idle when they have not touched the screen or the hardware buttons within the device lock timeout window,specified in the device’s Settings page. The conditions for detecting user idle status may change in future releases.

MSDN:ApplicationIdleDetectionMode

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.

解决方法

得到它了:

> UserIdleDetectionMode可防止锁定屏幕
> ApplicationIdleDetectionMode允许使用锁定屏幕执行

(另外,一旦禁用,就无法重新启用ApplicationIdleDetectionMode).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读