public class

NotificationCompat.CarExtender.UnreadConversation.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.core.app.NotificationCompat.CarExtender.UnreadConversation.Builder

Overview

Builder class for NotificationCompat.CarExtender.UnreadConversation objects.

Summary

Constructors
publicBuilder(java.lang.String name)

Constructs a new builder for NotificationCompat.CarExtender.UnreadConversation.

Methods
public NotificationCompat.CarExtender.UnreadConversation.BuilderaddMessage(java.lang.String message)

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

public NotificationCompat.CarExtender.UnreadConversationbuild()

Builds a new unread conversation object.

public NotificationCompat.CarExtender.UnreadConversation.BuildersetLatestTimestamp(long timestamp)

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

public NotificationCompat.CarExtender.UnreadConversation.BuildersetReadPendingIntent(PendingIntent pendingIntent)

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

public NotificationCompat.CarExtender.UnreadConversation.BuildersetReplyAction(PendingIntent pendingIntent, RemoteInput remoteInput)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.String name)

Constructs a new builder for NotificationCompat.CarExtender.UnreadConversation.

Parameters:

name: The name of the other participant in the conversation.

Methods

public NotificationCompat.CarExtender.UnreadConversation.Builder addMessage(java.lang.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:

message: The text of the new unread message.

Returns:

This object for method chaining.

public NotificationCompat.CarExtender.UnreadConversation.Builder setReplyAction(PendingIntent pendingIntent, RemoteInput remoteInput)

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

Parameters:

pendingIntent: The pending intent which will be triggered on a reply.
remoteInput: The remote input parcelable which will carry the reply.

Returns:

This object for method chaining.

See also: NotificationCompat.CarExtender.UnreadConversation.getRemoteInput(), NotificationCompat.CarExtender.UnreadConversation.getReplyPendingIntent()

public NotificationCompat.CarExtender.UnreadConversation.Builder setReadPendingIntent(PendingIntent pendingIntent)

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

Parameters:

pendingIntent: The pending intent to use.

Returns:

This object for method chaining.

public NotificationCompat.CarExtender.UnreadConversation.Builder setLatestTimestamp(long timestamp)

Sets the timestamp of the most recent message in an unread conversation. If a messaging notification has been posted by your application and has not yet been cancelled, posting a later notification with the same id and tag but without a newer timestamp may result in Android Auto not displaying a heads up notification for the later notification.

Parameters:

timestamp: The timestamp of the most recent message in the conversation.

Returns:

This object for method chaining.

Builds a new unread conversation object.

Returns:

The new unread conversation object.