63.5 Creating the Reply Action
The in-line reply will be accessible within the notification via an action button. This action now needs to be created and configured with an icon, a label to appear on the button, the PendingIntent object and the RemoteInput object. Modify the sendNotification() method to add the code to create this action:
.
.
import android.graphics.drawable.Icon;
import android.app.Notification;
import android.graphics.Color;
import androidx.core.content.ContextCompat;
.
.
public void sendNotification(View view) {
String replyLabel = "Enter your reply here";
RemoteInput remoteInput =
new RemoteInput.Builder(KEY_TEXT_REPLY)
.setLabel(replyLabel)
...