title: Push-notifications and MVVMCross
body: <p>We are facing a problem with handling a notification on Android with MVVMCross. </p>
  
  <p>I implemented the default <code>void CreateNotification()</code> but when we tap the notification in the notification center, the <code>onCreate()</code> fails with the following exception: </p>
  
  <blockquote>
    <p>System.NullReferenceException: Object reference not set to an instance
    of an object</p>
  </blockquote>
  
  <p>The code we are using:</p>
  
  <pre><code>var notificationManager = (NotificationManager)GetSystemService(NotificationService);
  
  //Create an intent to show ui
  var uiIntent = new Intent(this, typeof(HomeView));
  
  var notification = new Notification(Android.Resource.Drawable.StarOn, title);
  notification.Flags = NotificationFlags.AutoCancel;
  
  notification.SetLatestEventInfo(this, title, desc, PendingIntent.GetActivity(this, 0, uiIntent, PendingIntentFlags.UpdateCurrent));
  
  notificationManager.Notify(1, notification);
  </code></pre>
  
  <p>The HomeView in this sample is of type: </p>
  
  <blockquote>
    <p>public abstract class MvxBindingActivityView :
    Cirrious.MvvmCross.Droid.Views.MvxActivityView
                where TViewModel : class, Cirrious.MvvmCross.Interfaces.ViewModels.IMvxViewModel
        Member of Cirrious.MvvmCross.Binding.Droid.Views</p>
  </blockquote>
  
  <p>Can anybody help us where to fix this problem?</p>
  
  <p>Thanks,
  Christian</p>