语言

Notification.MessagingStyle.AddHistoricMessage 方法

定义

在此通知中添加用于历史上下文的消息。

[Android.Runtime.Register("addHistoricMessage", "(Landroid/app/Notification$MessagingStyle$Message;)Landroid/app/Notification$MessagingStyle;", "GetAddHistoricMessage_Landroid_app_Notification_MessagingStyle_Message_Handler", ApiSince=26)]
public virtual Android.App.Notification.MessagingStyle? AddHistoricMessage(Android.App.Notification.MessagingStyle.Message? message);
[<Android.Runtime.Register("addHistoricMessage", "(Landroid/app/Notification$MessagingStyle$Message;)Landroid/app/Notification$MessagingStyle;", "GetAddHistoricMessage_Landroid_app_Notification_MessagingStyle_Message_Handler", ApiSince=26)>]
abstract member AddHistoricMessage : Android.App.Notification.MessagingStyle.Message -> Android.App.Notification.MessagingStyle
override this.AddHistoricMessage : Android.App.Notification.MessagingStyle.Message -> Android.App.Notification.MessagingStyle

参数

message
Notification.MessagingStyle.Message

Notification.MessagingStyle.Message:要添加的历史消息

返回

此方法链接的此对象

特性

注解

在此通知中添加用于历史上下文的消息。 如果消息不是通知的主要主题,但可能会为对话提供上下文,则应将其添加为历史消息。 仅当相关时(例如,通过 RemoteInput 回复消息时)系统才可以选择显示它们。 消息应按时间顺序添加,即最旧的第一个消息,即最新消息。

Android 参考。android.app.Notification.MessagingStyle.addHistoricMessage

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于