Notification Cloud URI有任何限制吗?

时间:2011-12-08 12:36:26

标签: windows-phone-7 notifications push-notification mpns

我在WindowsPhone中使用推送通知。我可以从服务器发送通知并在Windows Phone中接收它。 我正在使用以下代码生成的云的URL。你们中的任何人都知道这个网址有限制,如时间限制或许可等。 从我的应用程序启动时起,我们需要为每个用户创建n no url。

///保持创建或找到的推送通道。             HttpNotificationChannel pushChannel;

        // The name of our push channel.
        string channelName = "ToastSampleChannel";

        InitializeComponent();

        // Try to find the push channel.
        pushChannel = HttpNotificationChannel.Find(channelName);

        // If the channel was not found, then create a new connection to the push service.
        if (pushChannel == null)
        {
            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();

        }
        else
        {
            // The channel was already open, so just register for all the events.
            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);

            // Display the URI for testing purposes. Normally, the URI would be passed back to your web service at this point.
            System.Diagnostics.Debug.WriteLine(pushChannel.ChannelUri.ToString());
            MessageBox.Show(String.Format("Channel Uri is {0}",
                pushChannel.ChannelUri.ToString()));

        }

        Thanks in advance. 
        Thanks
        Kamal. 

1 个答案:

答案 0 :(得分:3)

据我所知,推送通知只有三个限制:

  1. MPNS允许未经身份验证和通过身份验证的通知。但是,如果未经身份验证的推送请求每天超过500条消息(每台设备),则会受到限制。对使用客户端SSL进行身份验证的身份验证请求没有此类限制。
  2. 每个应用程序1个通知渠道
  3. 设备上的最大通知渠道为30