Most visited

Recently visited

NotificationCompat.CarExtender.UnreadConversation.Builder

public static class NotificationCompat.CarExtender.UnreadConversation.Builder
extends Object

java.lang.Object
   ↳ android.support.v4.app.NotificationCompat.CarExtender.UnreadConversation.Builder


生成器类为 NotificationCompat.CarExtender.UnreadConversation对象。

Summary

Public constructors

NotificationCompat.CarExtender.UnreadConversation.Builder(String name)

NotificationCompat.CarExtender.UnreadConversation构建新的构建器。

Public methods

NotificationCompat.CarExtender.UnreadConversation.Builder addMessage(String message)

将新的未读消息附加到此对话的消息列表中。

NotificationCompat.CarExtender.UnreadConversation build()

构建新的未读对话对象。

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

在未读对话中设置最新消息的时间戳。

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

设置读取此通知中的消息后将要发送的待处理意图。

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

设置挂起的意图和远程输入,它将传达对此通知的回复。

Inherited methods

From class java.lang.Object

Public constructors

NotificationCompat.CarExtender.UnreadConversation.Builder

NotificationCompat.CarExtender.UnreadConversation.Builder (String name)

NotificationCompat.CarExtender.UnreadConversation构建新的构建器。

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

Public methods

addMessage

NotificationCompat.CarExtender.UnreadConversation.Builder addMessage (String message)

将新的未读消息附加到此对话的消息列表中。 消息应该从最旧添加到最新。

Parameters
message String: The text of the new unread message.
Returns
NotificationCompat.CarExtender.UnreadConversation.Builder This object for method chaining.

build

NotificationCompat.CarExtender.UnreadConversation build ()

构建新的未读对话对象。

Returns
NotificationCompat.CarExtender.UnreadConversation The new unread conversation object.

setLatestTimestamp

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

在未读对话中设置最新消息的时间戳。 如果消息通知已由您的应用程序发布并且尚未取消,则发布具有相同标识和标签但没有更新时间戳的以后通知可能会导致Android Auto在稍后的通知中不显示抬头通知。

Parameters
timestamp long: The timestamp of the most recent message in the conversation.
Returns
NotificationCompat.CarExtender.UnreadConversation.Builder This object for method chaining.

setReadPendingIntent

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

设置读取此通知中的消息后将要发送的待处理意图。

Parameters
pendingIntent PendingIntent: The pending intent to use.
Returns
NotificationCompat.CarExtender.UnreadConversation.Builder This object for method chaining.

setReplyAction

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

设置挂起的意图和远程输入,它将传达对此通知的回复。

Parameters
pendingIntent PendingIntent: The pending intent which will be triggered on a reply.
remoteInput RemoteInput: The remote input parcelable which will carry the reply.
Returns
NotificationCompat.CarExtender.UnreadConversation.Builder This object for method chaining.

也可以看看:

Hooray!