title: How to prevent android quick reply notification from being stuck in loading?
body: <p>My app uses the Android N's new quick-reply feature to quickly take notes from a fixed notification, without having the user to open an activity.</p>
  
  <p>However, I would like the notification to be reset to its initial state after the user sends the quick reply message, without having to dismiss the notification.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>NotificationCompat.Builder builder = new NotificationCompat.Builder(this, Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O ? createChannel() : "").setSmallIcon(android.R.mipmap.sym_def_app_icon).setContentTitle("My Awesome App").setContentText("Doing some work...").setContentIntent(pendingIntent);
  
          if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.N) {
              android.support.v4.app.RemoteInput remoteInput = new RemoteInput.Builder(BookmarkCreatorReceiver.TXT_REPLY).setLabel("Reply").build();
  
              Intent replyIntent = new Intent(this, BookmarkCreatorReceiver.class);
              PendingIntent replyPendingIntent = PendingIntent.getBroadcast(this, 0, replyIntent, 0);
  
              NotificationCompat.Action action = new NotificationCompat.Action.Builder(android.R.drawable.ic_dialog_email, "Bookmark", replyPendingIntent).addRemoteInput(remoteInput).build();
              NotificationCompat.Action actionQuick = new NotificationCompat.Action.Builder(android.R.drawable.ic_dialog_email, "Quick", replyPendingIntent).build();
              builder.addAction(action);
              builder.addAction(actionQuick);
          }
  
          startForeground(NOTIFICATION_ID, builder.build());
  </code></pre>
  
  <p>The problem is that once the user sends a message and the Broadcast receiver is called, the notification stays in the loading state like this:</p>
  
  <p><a href="https://i.stack.imgur.com/7wLNc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7wLNc.jpg" alt="enter image description here"></a></p>
  
  <p>How can I remove the loading message, without having to discard the notification?</p>