Builder
open class Builder
kotlin.Any | |
↳ | androidx.core.app.NotificationCompat.CarExtender.UnreadConversation.Builder |
Builder class for CarExtender.UnreadConversation
objects.
Summary
Public constructors | |
---|---|
Constructs a new builder for |
Public methods | |
---|---|
open NotificationCompat.CarExtender.UnreadConversation.Builder |
addMessage(@Nullable message: String?) Appends a new unread message to the list of messages for this conversation. |
open NotificationCompat.CarExtender.UnreadConversation |
build() Builds a new unread conversation object. |
open NotificationCompat.CarExtender.UnreadConversation.Builder |
setLatestTimestamp(timestamp: Long) Sets the timestamp of the most recent message in an unread conversation. |
open NotificationCompat.CarExtender.UnreadConversation.Builder |
setReadPendingIntent(@Nullable pendingIntent: PendingIntent?) Sets the pending intent that will be sent once the messages in this notification are read. |
open 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
<init>
Builder(@NonNull name: String)
Constructs a new builder for CarExtender.UnreadConversation
.
Parameters | |
---|---|
name |
String: The name of the other participant in the conversation. |
Public methods
addMessage
@NonNull open fun addMessage(@Nullable message: String?): NotificationCompat.CarExtender.UnreadConversation.Builder
Appends a new unread message to the list of messages for this conversation. The messages should be added from oldest to newest.
Parameters | |
---|---|
message |
String?: The text of the new unread message. |
Return | |
---|---|
NotificationCompat.CarExtender.UnreadConversation.Builder |
This object for method chaining. |
build
@NonNull open fun build(): NotificationCompat.CarExtender.UnreadConversation
Builds a new unread conversation object.
Return | |
---|---|
NotificationCompat.CarExtender.UnreadConversation |
The new unread conversation object. |
setLatestTimestamp
@NonNull open fun setLatestTimestamp(timestamp: Long): NotificationCompat.CarExtender.UnreadConversation.Builder
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 |
Long: The timestamp of the most recent message in the conversation. |
Return | |
---|---|
NotificationCompat.CarExtender.UnreadConversation.Builder |
This object for method chaining. |
setReadPendingIntent
@NonNull open fun setReadPendingIntent(@Nullable pendingIntent: PendingIntent?): NotificationCompat.CarExtender.UnreadConversation.Builder
Sets the pending intent that will be sent once the messages in this notification are read.
Parameters | |
---|---|
pendingIntent |
PendingIntent?: The pending intent to use. |
Return | |
---|---|
NotificationCompat.CarExtender.UnreadConversation.Builder |
This object for method chaining. |
setReplyAction
@NonNull open fun setReplyAction(
@Nullable pendingIntent: PendingIntent?,
@Nullable remoteInput: RemoteInput?
): NotificationCompat.CarExtender.UnreadConversation.Builder
Sets the pending intent and remote input which will convey the reply to this notification.
Parameters | |
---|---|
pendingIntent |
PendingIntent?: The pending intent which will be triggered on a reply. |
remoteInput |
RemoteInput?: The remote input parcelable which will carry the reply. |
Return | |
---|---|
NotificationCompat.CarExtender.UnreadConversation.Builder |
This object for method chaining. |