C# 在WIndows Phone 8.1 Silverlight中处理Toast通知

C# 在WIndows Phone 8.1 Silverlight中处理Toast通知,c#,windows-phone-8,push-notification,apple-push-notifications,windows-phone-8.1,C#,Windows Phone 8,Push Notification,Apple Push Notifications,Windows Phone 8.1,我正在尝试将WNS与Windows Phone 8.1 SilverLight平台一起使用。我正在成功地在我的客户端应用程序上获取通知。但我一直在拦截点击/点击Toast通知 尝试:- public async void Initilialize() { channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); channel.PushNo

我正在尝试将WNS与Windows Phone 8.1 SilverLight平台一起使用。我正在成功地在我的客户端应用程序上获取通知。但我一直在拦截点击/点击Toast通知

尝试:-

public async void Initilialize()
{
    channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();

    channel.PushNotificationReceived += PushNotificationReceived;
}

void PushNotificationReceived(PushNotificationChannel sender, PushNotificationReceivedEventArgs args)
{
    DispatcherInvoker.Invoke(() => MessageBox.Show("Notifacation recieved")                     );
}
但是,当我点击Toast通知时,我无法看到消息,当我点击Toast时,我的应用程序正在成功启动


有人知道我遗漏了什么吗?

好的,这是我的错,只有当你的应用程序正在运行并且你在这段时间收到通知时,才会收到这个PushNotification