Język

Notification.MessagingStyle.AddMessage Method

Definition

Overloads

Name Description
AddMessage(Notification+MessagingStyle+Message)

Adds a Message for display in this notification.

AddMessage(ICharSequence, Int64, Person)

Adds a message for display by this notification.

AddMessage(ICharSequence, Int64, ICharSequence)

This method was deprecated in API level 28.

AddMessage(String, Int64, Person)

Adds a message for display by this notification.

AddMessage(String, Int64, String)

This method was deprecated in API level 28.

AddMessage(Notification+MessagingStyle+Message)

Adds a Message for display in this notification.

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

Parameters

message
Notification.MessagingStyle.Message

Notification.MessagingStyle.Message: The Message to be displayed

Returns

this object for method chaining

Attributes

Remarks

Adds a Message for display in this notification. The messages should be added in chronologic order, i.e. the oldest first, the newest last. Multiple Messages in a row with the same timestamp and sender may be grouped as a single message. This means an app should represent a message that has both an image and text as two Message objects, one with the image (and fallback text), and the other with the message text. For consistency, a text message (if any) should be provided after Uri content.

Android reference for android.app.Notification.MessagingStyle.addMessage.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AddMessage(ICharSequence, Int64, Person)

Adds a message for display by this notification.

[Android.Runtime.Register("addMessage", "(Ljava/lang/CharSequence;JLandroid/app/Person;)Landroid/app/Notification$MessagingStyle;", "GetAddMessage_Ljava_lang_CharSequence_JLandroid_app_Person_Handler", ApiSince=28)]
public virtual Android.App.Notification.MessagingStyle? AddMessage(Java.Lang.ICharSequence text, long timestamp, Android.App.Person? sender);
[<Android.Runtime.Register("addMessage", "(Ljava/lang/CharSequence;JLandroid/app/Person;)Landroid/app/Notification$MessagingStyle;", "GetAddMessage_Ljava_lang_CharSequence_JLandroid_app_Person_Handler", ApiSince=28)>]
abstract member AddMessage : Java.Lang.ICharSequence * int64 * Android.App.Person -> Android.App.Notification.MessagingStyle
override this.AddMessage : Java.Lang.ICharSequence * int64 * Android.App.Person -> Android.App.Notification.MessagingStyle

Parameters

text
ICharSequence

CharSequence: a CharSequence to be displayed as the message content. This value cannot be null.

timestamp
Int64

long: time in milliseconds at which the message arrived

sender
Person

Person: the Person who sent the message. Should be null for messages by the current user, in which case the platform will insert the user set in MessagingStyle(Person).

Returns

this object for method chaining

Attributes

Remarks

Adds a message for display by this notification. Convenience call for a simple Message in addMessage(Notification.MessagingStyle.Message).

See also:

Android reference for android.app.Notification.MessagingStyle.addMessage.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AddMessage(ICharSequence, Int64, ICharSequence)

This method was deprecated in API level 28.

[Android.Runtime.Register("addMessage", "(Ljava/lang/CharSequence;JLjava/lang/CharSequence;)Landroid/app/Notification$MessagingStyle;", "GetAddMessage_Ljava_lang_CharSequence_JLjava_lang_CharSequence_Handler", ApiSince=24)]
public virtual Android.App.Notification.MessagingStyle? AddMessage(Java.Lang.ICharSequence? text, long timestamp, Java.Lang.ICharSequence? sender);
[<Android.Runtime.Register("addMessage", "(Ljava/lang/CharSequence;JLjava/lang/CharSequence;)Landroid/app/Notification$MessagingStyle;", "GetAddMessage_Ljava_lang_CharSequence_JLjava_lang_CharSequence_Handler", ApiSince=24)>]
abstract member AddMessage : Java.Lang.ICharSequence * int64 * Java.Lang.ICharSequence -> Android.App.Notification.MessagingStyle
override this.AddMessage : Java.Lang.ICharSequence * int64 * Java.Lang.ICharSequence -> Android.App.Notification.MessagingStyle

Parameters

text
ICharSequence

CharSequence: A CharSequence to be displayed as the message content

timestamp
Int64

long: Time in milliseconds at which the message arrived

sender
ICharSequence

CharSequence: A CharSequence to be used for displaying the name of the sender. Should be null for messages by the current user, in which case the platform will insert getUserDisplayName(). Should be unique amongst all individuals in the conversation, and should be consistent during re-posts of the notification.

Returns

this object for method chaining

Attributes

Remarks

This method was deprecated in API level 28. use addMessage(CharSequence,long,Person)

Adds a message for display by this notification. Convenience call for a simple Message in addMessage(Notification.MessagingStyle.Message).

See also:

Android reference for android.app.Notification.MessagingStyle.addMessage.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AddMessage(String, Int64, Person)

Adds a message for display by this notification.

public Android.App.Notification.MessagingStyle? AddMessage(string text, long timestamp, Android.App.Person? sender);
member this.AddMessage : string * int64 * Android.App.Person -> Android.App.Notification.MessagingStyle

Parameters

text
String

CharSequence: a CharSequence to be displayed as the message content. This value cannot be null.

timestamp
Int64

long: time in milliseconds at which the message arrived

sender
Person

Person: the Person who sent the message. Should be null for messages by the current user, in which case the platform will insert the user set in MessagingStyle(Person).

Returns

this object for method chaining

Remarks

Adds a message for display by this notification. Convenience call for a simple Message in addMessage(Notification.MessagingStyle.Message).

See also:

Android reference for android.app.Notification.MessagingStyle.addMessage.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AddMessage(String, Int64, String)

This method was deprecated in API level 28.

public Android.App.Notification.MessagingStyle? AddMessage(string? text, long timestamp, string? sender);
member this.AddMessage : string * int64 * string -> Android.App.Notification.MessagingStyle

Parameters

text
String

CharSequence: A CharSequence to be displayed as the message content

timestamp
Int64

long: Time in milliseconds at which the message arrived

sender
String

CharSequence: A CharSequence to be used for displaying the name of the sender. Should be null for messages by the current user, in which case the platform will insert getUserDisplayName(). Should be unique amongst all individuals in the conversation, and should be consistent during re-posts of the notification.

Returns

this object for method chaining

Remarks

This method was deprecated in API level 28. use addMessage(CharSequence,long,Person)

Adds a message for display by this notification. Convenience call for a simple Message in addMessage(Notification.MessagingStyle.Message).

See also:

Android reference for android.app.Notification.MessagingStyle.addMessage.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to