title: Notification actions not calling broadcast receiver Android
body: <p>I am trying to add 2 actions my FCM notifications </p>
  
  <ol>
  <li><p>Mark Important</p></li>
  <li><p>Mark Read</p></li>
  </ol>
  
  <p>I have created a Broadcast receiver, but the <code>OnReceive</code> of the Broadcast receiver is not getting called.</p>
  
  <p>This is the code where I create a notification with the 2 actions:</p>
  
  <pre><code>   [Service, IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })]
      public class FCMListenerService : FirebaseMessagingService
      {
          private string Tag = "FCM_Listener_Service";
  
          public override void OnMessageReceived(RemoteMessage message)
          {
              var data = message.Data;
  
              var notification = new FCMNotificationDTO(data);
  
              SendNotification(notification);
          }
  
          private void SendNotification(FCMNotificationDTO notification)
          {
              var intent = new Intent(this, typeof(BaseDrawActivity));
  
              intent.PutExtra("NotificationId", notification.NotificationId);
  
  
              var openActivityIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.UpdateCurrent);
  
              var defaultSoundUri = RingtoneManager.GetDefaultUri(RingtoneType.Notification);
  
              //important intent
              Intent importantIntent = new Intent("com.myapp.myapp.NotificationActionHandler");
              importantIntent.SetAction(NotificationActionHandler.MARK_IMPORTANT);
              PendingIntent intentImportant = PendingIntent.GetBroadcast(this, 0, importantIntent, PendingIntentFlags.UpdateCurrent);
  
              //read intent
              Intent readIntent = new Intent("com.myapp.myapp.NotificationActionHandler");
              readIntent.SetAction(NotificationActionHandler.MARK_READ);
              PendingIntent intentRead = PendingIntent.GetBroadcast(this, 0, readIntent, PendingIntentFlags.UpdateCurrent);
  
  
              var notificationBuilder =
                               new NotificationCompat.Builder(this)
                                   // .SetSmallIcon(Resource.Drawable.Icon)
                                   .SetContentTitle(notification.AlertName)
                                   .SetContentText(notification.Reference)
                                   .SetAutoCancel(true)
                                   .SetSound(defaultSoundUri)
                                   .SetContentIntent(openActivityIntent) // When the notification is clicked open the notification activity
                                   .AddAction(Resource.Drawable.ic_alert_circle_outline, GetText(Resource.String.important), intentImportant)
                                   .AddAction(Resource.Drawable.ic_eye_outline, GetText(Resource.String.mark_read), intentRead)
                                   ;
  
              var notificationManager = NotificationManager.FromContext(this);
              notificationManager.Notify(notification.NotificationId, notificationBuilder.Build());
          }
      }
  </code></pre>
  
  <p>My BroadCast Receiver:</p>
  
  <pre><code>[BroadcastReceiver(Enabled = true, Name = "com.myapp.myapp.NotificationActionHandler")]
  public class NotificationActionHandler : BroadcastReceiver
  {
      public static string MARK_READ = "MARK_READ";
      public static string MARK_IMPORTANT = "MARK_IMPORTANT";
  
      public override void OnReceive(Context context, Intent intent)
      {
          var action = intent.Action;
  
          switch (action)
          {
              case "MARK_IMPORTANT":
                  Toast.MakeText(context, "Mark important notification", ToastLength.Short).Show();
                  break;
  
              case "MARK_READ":
                  Toast.MakeText(context, "Mark read notification", ToastLength.Short).Show();
                  break;
          }
      }
  }
  </code></pre>
  
  <p>After building the app the Manifest contains the Broad cast receiver details</p>
  
  <pre><code>&lt;receiver android:enabled="true" android:name="com.myapp.myapp.NotificationActionHandler" /&gt;
  </code></pre>