Push notifications on Xamarin

@Maria_Regil, you can also independently process the data that comes with push notification. Here’s an example of how to do this:

  var values = JsonConvert.DeserializeObject<Dictionary<String, String>>( (String) notif.Data[ "android_immediate_push" ] );
  NotificationCompat.Builder builder = new NotificationCompat.Builder( this, "default" )
                                                             .SetContentTitle( values["contentTitle"] )
                                                             .SetContentText( (String) notif.Data["message"] )
                                                             .SetSmallIcon( Resource.Drawable.ic_mtrl_checked_circle );

  Notification notification = builder.Build();
  NotificationManager manager = GetSystemService( Context.NotificationService ) as NotificationManager;
  const int notificationId = 0;
  manager.Notify( notificationId, notification );


This is a test case (data processing variant), modify the code for your purposes.

Regards, Nikita.