Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public C2dmPushChannel(C2dmPushChannelSettings channelSettings)
 {
     androidSettings = channelSettings;
 }
Exemplo n.º 4
0
		public C2dmPushChannel(C2dmPushChannelSettings channelSettings)
		{
			androidSettings = channelSettings;
		}
Exemplo n.º 5
0
 public C2dmPushService(C2dmPushChannelSettings channelSettings, PushServiceSettings serviceSettings = null)
     : base(new C2dmPushChannelFactory(channelSettings), serviceSettings)
 {
 }
Exemplo n.º 6
0
 public C2dmPushChannelFactory(C2dmPushChannelSettings channelSettings)
 {
     this.channelSettings = channelSettings;
 }
Exemplo n.º 7
0
		public static void RegisterC2dmService(this IPushBroker broker, C2dmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null)
		{
			broker.RegisterService<C2dmNotification>(new C2dmPushService(channelSettings, serviceSettings), applicationId);
		}
Exemplo n.º 8
0
 public void StartAndroidPushService(Android.C2dmPushChannelSettings channelSettings, PushServiceSettings serviceSettings = null)
 {
     androidService = new Android.C2dmPushService(channelSettings, serviceSettings);
     androidService.Events.RegisterProxyHandler(this.Events);
 }
Exemplo n.º 9
0
 public C2dmPushService(IPushChannelFactory pushChannelFactory, C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
     : base(pushChannelFactory ?? new C2dmPushChannelFactory(), channelSettings, serviceSettings)
 {
 }
Exemplo n.º 10
0
		public static void RegisterC2dmService(this IPushBroker broker, C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null)
		{
			RegisterC2dmService (broker, channelSettings, null, serviceSettings);
		}
Exemplo n.º 11
0
 public C2dmPushService(IPushChannelFactory pushChannelFactory, C2dmPushChannelSettings channelSettings)
     : this(pushChannelFactory, channelSettings, default(IPushServiceSettings))
 {
 }
Exemplo n.º 12
0
 public C2dmPushService(C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
     : this(default(IPushChannelFactory), channelSettings, serviceSettings)
 {
 }
Exemplo n.º 13
0
		public C2dmPushService(IPushChannelFactory pushChannelFactory, C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
			: base(pushChannelFactory ?? new C2dmPushChannelFactory(), channelSettings, serviceSettings)
		{
		}
Exemplo n.º 14
0
		public C2dmPushService(IPushChannelFactory pushChannelFactory, C2dmPushChannelSettings channelSettings)
			: this(pushChannelFactory, channelSettings, default(IPushServiceSettings))
		{
		}
Exemplo n.º 15
0
		public C2dmPushService(C2dmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
			: this(default(IPushChannelFactory), channelSettings, serviceSettings)
		{
		}