public static class Notification.CarExtender.Builder
extends Object
java.lang.Object | |
↳ | android.app.Notification.CarExtender.Builder |
Notification.CarExtender.UnreadConversation
对象的生成器类。
Public constructors |
|
---|---|
Notification.CarExtender.Builder(String name) |
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
|
Notification.CarExtender.Builder (String name)
为 Notification.CarExtender.UnreadConversation
构建新的构建器。
Parameters | |
---|---|
name |
String : The name of the other participant in the conversation. |
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. |
Notification.CarExtender.UnreadConversation build ()
构建新的未读对话对象。
Returns | |
---|---|
Notification.CarExtender.UnreadConversation |
The new unread conversation object. |
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. |
Notification.CarExtender.Builder setReadPendingIntent (PendingIntent pendingIntent)
设置读取此通知中的消息后将要发送的待处理意图。
Parameters | |
---|---|
pendingIntent |
PendingIntent : The pending intent to use. |
Returns | |
---|---|
Notification.CarExtender.Builder |
This object for method chaining. |
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. |