在 WIndows Phone 8.1 Silverlight 中处理 ToastNotification
本文关键字:处理 ToastNotification Silverlight WIndows Phone | 更新日期: 2023-09-27 18:33:43
我正在尝试使用WNS with Windows Phone 8.1 (SilverLight)
平台。我在我的客户端应用程序上成功收到通知。但是我被困在拦截点击/点击吐司通知上。
尝试:-
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 时,我的应用程序已成功启动。
有人知道我错过了什么吗?
好的,这是我的错,此推送通知接收只会在您的应用程序运行时命中,并且您在此期间收到通知。