NotificationCompat.CarExtender.UnreadConversation.Builder

public class NotificationCompat.CarExtender.UnreadConversation.Builder


Builder class for CarExtender.UnreadConversation objects.

Summary

Public constructors

Constructs a new builder for CarExtender.UnreadConversation.

Public methods

@NonNull NotificationCompat.CarExtender.UnreadConversation.Builder

Appends a new unread message to the list of messages for this conversation.

@NonNull NotificationCompat.CarExtender.UnreadConversation

Builds a new unread conversation object.

@NonNull NotificationCompat.CarExtender.UnreadConversation.Builder
setLatestTimestamp(long timestamp)

Sets the timestamp of the most recent message in an unread conversation.

@NonNull NotificationCompat.CarExtender.UnreadConversation.Builder

Sets the pending intent that will be sent once the messages in this notification are read.

@NonNull NotificationCompat.CarExtender.UnreadConversation.Builder
setReplyAction(
    @Nullable PendingIntent pendingIntent,
    @Nullable RemoteInput remoteInput
)

Sets the pending intent and remote input which will convey the reply to this notification.

Public constructors

Builder

public Builder(@NonNull String name)

Constructs a new builder for CarExtender.UnreadConversation.

Parameters
@NonNull String name

The name of the other participant in the conversation.

Public methods

addMessage

public @NonNull NotificationCompat.CarExtender.UnreadConversation.Builder addMessage(@Nullable String message)

Appends a new unread message to the list of messages for this conversation. The messages should be added from oldest to newest.

Parameters
@Nullable String message

The text of the new unread message.

Returns
@NonNull NotificationCompat.CarExtender.UnreadConversation.Builder

This object for method chaining.