/// <summary> /// Called to setup the push notification channel /// </summary> /// <param name="clientType"> </param> public void InitializePushChannel(PhoneClientType clientType) { _clientTypeName = clientType.ToString(); _notificationChannel = HttpNotificationChannel.Find(PushNotificationChannelName); if (_notificationChannel == null) { // check that a network connection is present if (!NetworkInterface.GetIsNetworkAvailable()) throw new NoInternetConnectionException(); _notificationChannel = new HttpNotificationChannel(PushNotificationChannelName); _notificationChannel.ChannelUriUpdated += NotificationChannel_ChannelUriUpdated; // open the channel _notificationChannel.Open(); } else { _notificationChannel.ChannelUriUpdated += NotificationChannel_ChannelUriUpdated; if (PushChannelInitialized != null) PushChannelInitialized(this, new EventArgs()); } }
public void InitializePushChannel(PhoneClientType clientType) { if (PushChannelInitialized != null) PushChannelInitialized(this, new EventArgs()); }