61.8 Updating the Notification
After sending the reply within the notification you may have noticed that the progress indicator continues to spin within the notification panel as highlighted in Figure 61-4:
Figure 61-4
The notification is showing this indicator because it is waiting for a response from the activity confirming receipt of the sent text. The recommended approach to performing this task is to update the notification with a new message indicating that the reply has been received and handled. Since the original notification was assigned an ID when it was issued, this can be used once again to perform an update. Add the following code to the handleIntent() method to perform this task:
private void handleIntent() {
Intent intent = this.getIntent();
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
if (remoteInput != null) {
...