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

问题描述

我的WP8应用程序设置为锁屏下方运行,因为它需要继续甚至当屏幕被锁定运行,但是我希望能够当用户解锁其屏幕检测,我该怎么办呢?

My WP8 app is set to run underneath the lock screen because it needs to continue to run even while the screen is locked, but I want to be able to detect when the user unlocks their screen, how do I do this?

用什么方法,如果有的话,当手机被解锁被称为?

What methods, if any, are called when the phone is unlocked?

推荐答案

帧的视野开阔事件将触发,当用户解锁(它也将火遮住的时候,手机是被锁定)。

The frame's Unobscured event will fire when the user unlocks (it will also fire Obscured when the phone is being locked).

不过,这些事件也火了的MessageBox,提醒之类的,所以你会得到其他的假阳性。然而,它应该可以检测出你是很轻松地后的场景。

However these events will also fire for a MessageBox, a Reminder and the like so you will get other false positive. However it should be possible to detect the scenario you are after pretty easily.

请参阅的。

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

09-02 21:58