70.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 70-4:
Figure 70-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 fun handleIntent() {
.
.
if (remoteInput != null) {
val inputString = remoteInput.getCharSequence(
...