【问题标题】:Event occured when phone receives call Windows phone 8.1手机接听电话时发生事件 Windows phone 8.1
【发布时间】:2014-11-14 06:40:02
【问题描述】:

我正在开发一个 Windows Phone 应用程序,我想知道当屏幕上显示某些页面并且手机接到电话时,会发生什么事件?如何订阅该活动?

在 Windows phone 8 中,它是 Obscured 事件。

有没有类似的活动??

【问题讨论】:

  • 应用还没有被暂停吗?如果是这样,订阅暂停的事件可以吗?

标签: c# windows-phone-8 windows-8 windows-8.1 windows-phone-8.1


【解决方案1】:

我会关注CoreWindow.Activated 以查看应用程序的窗口何时被激活和停用。

{
   ...
   Window.Current.Activated += Current_Activated;
   ...
}

void Current_Activated(object sender, Windows.UI.Core.WindowActivatedEventArgs e)
{
    Debug.WriteLine(String.Format("Activated {0}", e.WindowActivationState));
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多