protected override void OnMessage(Context context, Intent intent) { //Push Notification arrived - print out the keys/values if (intent != null && intent.Extras != null) { var data = intent.Extras.KeySet().ToDictionary(key => key, key => intent.Extras.Get(key).ToString()); string alert; data.TryGetValue("alert", out alert); if (!string.IsNullOrEmpty(alert)) { PushNotificationsManagerFactory.GetInstance().OnMessage(alert); } } }
protected override void OnRegistered(Context context, string registrationId) { //Receive registration Id for sending GCM Push Notifications to PushNotificationsManagerFactory.GetInstance().SendToken(registrationId); }