title: Remove Notification when addAction called?
body: <p>I'm adding two action buttons to my notification, when I click either of them they perform the action desired however the notification remains in my notification drawer.  I know it's possible to remove the notification from the notification drawer when an action button is clicked as that is how Gmail functions.  If I click the main notification it opens the app and removes the notification from the notification drawer.</p>
  
  <p>Here is a snippet of my code:</p>
  
  <pre><code>Intent completeIntent = new Intent(getApplicationContext(), MarkComplete.class);
          completeIntent.putExtra("rowid", inrowid);
          completeIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
  
  PendingIntent markCompleteIntent = PendingIntent.getActivity(getApplicationContext(), inrow, completeIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
  builder.setSmallIcon(R.drawable.ic_launcher)
                  .setContentTitle("Title")
                  .setContentText("text")
                  .setContentIntent(notificationReleaseIntent)
                  .setPriority(Notification.PRIORITY_HIGH)
                  .setAutoCancel(true)
                  .addAction(R.drawable.complete, "Mark Complete", markCompleteIntent);
  </code></pre>
  
  <p>Edit - 
  As zionpi pointed out I needed to call notification.cancel(); to remove the notification once the addAction button had been clicked.  I simply added this method to my classes where the PendingIntent was pointing.</p>
  
  <pre><code>public static void CancelNotification(Context ctx, int notifyId) {
      String  s = Context.NOTIFICATION_SERVICE;
      NotificationManager mNM = (NotificationManager) ctx.getSystemService(s);
      mNM.cancel(notifyId);
  }
  </code></pre>