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のドキュメントがないためです。それが可能で、サーバーが通知を送信した場合、それは正しく表示されますか? これについて貴重なご意見をお寄せください。

4

1 に答える 1

4

それは可能であり、それを行う正しい方法です。1 つのアプリ、1 つのチャネルで、何種類のプッシュ通知を使用しても構いません。

于 2013-07-24T09:00:11.540 に答える