Windows Phone 8:检测设备屏幕锁定并唤醒 [英] Windows Phone 8: detect device screen lock and wake

查看:79
本文介绍了Windows Phone 8:检测设备屏幕锁定并唤醒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何变通办法来以编程方式检测设备屏幕何时关闭(自动或按下锁定按钮)?

Is there any workaround to detect when device screen gets off (automatically or pressing lock button) programmatically?

如果是这样,是否有任何方法可以在检测到此事件时唤醒设备,以使其从不锁定屏幕?

If so, is there any way to wake device when this event is detect, in order to never phone lock screen?

推荐答案

你好,

不,没有这样的事件.只有应用程序停用事件,但这仅适用于休眠状态或逻辑删除状态.

No, there's no such event. There's only the application deactivated event but that's only for either dormant or tombstone state.

您也无法阻止锁定屏幕的发生.
您可以做的是在锁定屏幕下运行您的应用.

You also cannot prevent the lock screen from happening.
What you can do is run your app under lock screen.

有关详情,请参阅此帖子:

See this post for more information: http://blogs.msdn.com/b/jaimer/archive/2010/11/01/running-a-windows-phone-application-under-the-lock-screen.aspx


这篇关于Windows Phone 8:检测设备屏幕锁定并唤醒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆