Windows Phone 8推送通知:我能够将相同的推送通道绑定到Toast和Tile吗?

4
以下是 WP8 推送通知的代码。
HttpNotificationChannel pushChannel = new HttpNotificationChannel(channelName);

                // Register for all the events before attempting to open the channel.
                pushChannel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>(PushChannel_ChannelUriUpdated);
                pushChannel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>(PushChannel_ErrorOccurred);

                // Register for this notification only if you need to receive the notifications while your application is running.
                pushChannel.ShellToastNotificationReceived += new EventHandler<NotificationEventArgs>(PushChannel_ShellToastNotificationReceived);

                pushChannel.Open();

                // Bind this new channel for toast events.
                pushChannel.BindToShellToast();
                pushChannel.BindToShellTile();

如您在上面的代码中所见,我将pushChannel绑定到shellToast和shellTile。我想知道这是否有效?因为我在MSDN上没有找到任何相关文档。如果可能,并且服务器发送了任何通知,它们会被正确显示吗? 请提供您宝贵的反馈意见。
1个回答

4

这是可能的,也是正确的做法。一个应用程序,一个通道,无论您使用多少种推送通知。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接