public AndroidPushChannel(AndroidPushChannelSettings 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); } transport = new C2dmMessageTransportAsync(); transport.UpdateGoogleClientAuthToken += new Action<string>((newToken) => { this.googleAuthToken = newToken; }); transport.MessageResponseReceived += new Action<C2dmMessageTransportResponse>(transport_MessageResponseReceived); transport.UnhandledException += new Action<AndroidNotification, Exception>(transport_UnhandledException); }
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); }