protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); textViewMsg = FindViewById <TextView> (Resource.Id.textViewMsg); #region Check to ensure user has used their own GCM Service, Hub Name, and Hub Secret if (MyRegistrationService.GCM_SENDER_ID == "YOUR-SENDER-ID") { Log("You must change the SampleGcmBroadcastReceiver.SENDER_IDS to your own Sender ID for the sample to work!"); return; } if (MyRegistrationService.HUB_NAME == "YOUR-HUB-NAME") { Log("You must enter your own Hub Name and Hub Listen Secret for the sample to work!"); return; } #endregion Log("Registering for Remote Notifications..."); MyRegistrationService.Register(this); }
public override void OnTokenRefresh() { MyRegistrationService.Register(this); }