Most visited

Recently visited

Added in API level 23

Notification.CarExtender.Builder

public static class Notification.CarExtender.Builder
extends Object

java.lang.Object
    android.app.Notification.CarExtender.Builder


Notification.CarExtender.UnreadConversation对象的生成器类。

摘要(Summary)

Public constructors

Notification.CarExtender.Builder(String name)

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

公共方法(Public methods)

Notification.CarExtender.Builder addMessage(String message)

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

Notification.CarExtender.UnreadConversation build()

构建新的未读对话对象。

Notification.CarExtender.Builder setLatestTimestamp(long timestamp)

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

Notification.CarExtender.Builder setReadPendingIntent(PendingIntent pendingIntent)

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

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

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

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

Notification.CarExtender.Builder

Added in API level 23
Notification.CarExtender.Builder (String name)

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

参数(Parameters)
name String: The name of the other participant in the conversation.

公共方法(Public methods)

addMessage

Added in API level 23
Notification.CarExtender.Builder addMessage (String message)

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

参数(Parameters)
message String: The text of the new unread message.
返回(Returns)
Notification.CarExtender.Builder This object for method chaining.

build

Added in API level 23
Notification.CarExtender.UnreadConversation build ()

构建新的未读对话对象。

返回(Returns)
Notification.CarExtender.UnreadConversation The new unread conversation object.

setLatestTimestamp

Added in API level 23
Notification.CarExtender.Builder setLatestTimestamp (long timestamp)

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

参数(Parameters)
timestamp long: The timestamp of the most recent message in the conversation.
返回(Returns)
Notification.CarExtender.Builder This object for method chaining.

setReadPendingIntent

Added in API level 23
Notification.CarExtender.Builder setReadPendingIntent (PendingIntent pendingIntent)

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

参数(Parameters)
pendingIntent PendingIntent: The pending intent to use.
返回(Returns)
Notification.CarExtender.Builder This object for method chaining.

setReplyAction

Added in API level 23
Notification.CarExtender.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)
Notification.CarExtender.Builder This object for method chaining.

也可以看看:

Hooray!