Exemple #1
0
        public C2dmPushChannel(C2dmPushChannelSettings channelSettings, PushServiceSettings serviceSettings = null)
            : base(channelSettings, serviceSettings)
        {
            androidSettings = channelSettings;

            //Go get the auth token from google
            try
            {
                RefreshGoogleAuthToken();
            }
            catch (GoogleLoginAuthorizationException glaex)
            {
                this.Events.RaiseChannelException(glaex, PlatformType.AndroidC2dm);
            }

            transport = new C2dmMessageTransportAsync();
            transport.UpdateGoogleClientAuthToken += new Action<string>((newToken) =>
            {
                this.googleAuthToken = newToken;
            });

            transport.MessageResponseReceived += new Action<C2dmMessageTransportResponse>(transport_MessageResponseReceived);

            transport.UnhandledException += new Action<C2dmNotification, Exception>(transport_UnhandledException);
        }
Exemple #2
0
        public C2dmPushChannel(C2dmPushChannelSettings channelSettings, PushServiceSettings serviceSettings = null) : base(channelSettings, serviceSettings)
        {
            androidSettings = channelSettings;

            //Go get the auth token from google
            try
            {
                RefreshGoogleAuthToken();
            }
            catch (GoogleLoginAuthorizationException glaex)
            {
                this.Events.RaiseChannelException(glaex, PlatformType.AndroidC2dm);
            }

            transport = new C2dmMessageTransportAsync();
            transport.UpdateGoogleClientAuthToken += new Action <string>((newToken) =>
            {
                this.googleAuthToken = newToken;
            });

            transport.MessageResponseReceived += new Action <C2dmMessageTransportResponse>(transport_MessageResponseReceived);

            transport.UnhandledException += new Action <C2dmNotification, Exception>(transport_UnhandledException);
        }
Exemple #3
0
 public C2dmPushChannel(C2dmPushChannelSettings channelSettings)
 {
     androidSettings = channelSettings;
 }
		public C2dmPushChannel(C2dmPushChannelSettings channelSettings)
		{
			androidSettings = channelSettings;
		}
 public C2dmPushService(C2dmPushChannelSettings channelSettings, PushServiceSettings serviceSettings = null)
     : base(new C2dmPushChannelFactory(channelSettings), serviceSettings)
 {
 }
 public C2dmPushChannelFactory(C2dmPushChannelSettings channelSettings)
 {
     this.channelSettings = channelSettings;
 }
		public static void RegisterC2dmService(this IPushBroker broker, C2dmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null)
		{
			broker.RegisterService<C2dmNotification>(new C2dmPushService(channelSettings, serviceSettings), applicationId);
		}
Exemple #8
0
 public void StartAndroidPushService(Android.C2dmPushChannelSettings channelSettings, PushServiceSettings serviceSettings = null)
 {
     androidService = new Android.C2dmPushService(channelSettings, serviceSettings);
     androidService.Events.RegisterProxyHandler(this.Events);
 }
Exemple #9
0
 public C2dmPushService(IPushChannelFactory pushChannelFactory, C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
     : base(pushChannelFactory ?? new C2dmPushChannelFactory(), channelSettings, serviceSettings)
 {
 }
		public static void RegisterC2dmService(this IPushBroker broker, C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null)
		{
			RegisterC2dmService (broker, channelSettings, null, serviceSettings);
		}
Exemple #11
0
 public C2dmPushService(IPushChannelFactory pushChannelFactory, C2dmPushChannelSettings channelSettings)
     : this(pushChannelFactory, channelSettings, default(IPushServiceSettings))
 {
 }
Exemple #12
0
 public C2dmPushService(C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
     : this(default(IPushChannelFactory), channelSettings, serviceSettings)
 {
 }
Exemple #13
0
		public C2dmPushService(IPushChannelFactory pushChannelFactory, C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
			: base(pushChannelFactory ?? new C2dmPushChannelFactory(), channelSettings, serviceSettings)
		{
		}
Exemple #14
0
		public C2dmPushService(IPushChannelFactory pushChannelFactory, C2dmPushChannelSettings channelSettings)
			: this(pushChannelFactory, channelSettings, default(IPushServiceSettings))
		{
		}
Exemple #15
0
		public C2dmPushService(C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
			: this(default(IPushChannelFactory), channelSettings, serviceSettings)
		{
		}