Added in API level 23

Builder

class Builder
kotlin.Any
   ↳ android.app.Notification.CarExtender.Builder

Builder class for CarExtender.UnreadConversation objects.

Summary

Public constructors
Builder(name: String!)

Constructs a new builder for CarExtender.UnreadConversation.

Public methods
open Notification.CarExtender.Builder!
addMessage(message: String!)

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

open Notification.CarExtender.UnreadConversation!

Builds a new unread conversation object.

open Notification.CarExtender.Builder!

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

open Notification.CarExtender.Builder!

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

open Notification.CarExtender.Builder!
setReplyAction(pendingIntent: PendingIntent!, remoteInput: RemoteInput!)

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

Public constructors

Builder

Added in API level 23
Builder(name: String!)

Constructs a new builder for CarExtender.UnreadConversation.

Parameters
name String!: The name of the other participant in the conversation.

Public methods

addMessage

Added in API level 23
open fun addMessage(message: String!): Notification.CarExtender.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
Notification.CarExtender.Builder! This object for method chaining.

build

Added in API level 23
open fun build(): Notification.CarExtender.UnreadConversation!

Builds a new unread conversation object.

Return
Notification.CarExtender.UnreadConversation! The new unread conversation object.

setLatestTimestamp

Added in API level 23
open fun setLatestTimestamp(timestamp: Long): Notification.CarExtender.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
Notification.CarExtender.Builder! This object for method chaining.

setReadPendingIntent

Added in API level 23
open fun setReadPendingIntent(pendingIntent: PendingIntent!): Notification.CarExtender.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
Notification.CarExtender.Builder! This object for method chaining.

setReplyAction

Added in API level 23
open fun setReplyAction(
    pendingIntent: PendingIntent!,
    remoteInput: RemoteInput!
): Notification.CarExtender.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
Notification.CarExtender.Builder! This object for method chaining.