Notification.MessagingStyle.Message Constructors

Definition

Overloads

Notification.MessagingStyle.Message(ICharSequence, Int64, Person)

Constructor

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;JLandroid/app/Person;)V", "", ApiSince=28)]
public Message(Java.Lang.ICharSequence text, long timestamp, Android.App.Person? sender);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;JLandroid/app/Person;)V", "", ApiSince=28)>]
new Android.App.Notification.MessagingStyle.Message : Java.Lang.ICharSequence * int64 * Android.App.Person -> Android.App.Notification.MessagingStyle.Message

Parameters

text
ICharSequence

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

timestamp
Int64

long: time 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). The person provided should contain an Icon, set with Person.Builder.setIcon(Icon) and also have a name provided with Person.Builder.setName(CharSequence). If multiple users have the same name, consider providing a key with Person.Builder.setKey(String) in order to differentiate between the different users.

Attributes

Remarks

Constructor

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

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

Notification.MessagingStyle.Message(ICharSequence, Int64, ICharSequence)

This constructor is deprecated.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;JLjava/lang/CharSequence;)V", "", ApiSince=24)]
public Message(Java.Lang.ICharSequence text, long timestamp, Java.Lang.ICharSequence sender);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;JLjava/lang/CharSequence;)V", "", ApiSince=24)>]
new Android.App.Notification.MessagingStyle.Message : Java.Lang.ICharSequence * int64 * Java.Lang.ICharSequence -> Android.App.Notification.MessagingStyle.Message

Parameters

text
ICharSequence

CharSequence: A CharSequence to be displayed as the message content

timestamp
Int64

long: Time 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 MessagingStyle.getUserDisplayName(). Should be unique amongst all individuals in the conversation, and should be consistent during re-posts of the notification.

Attributes

Remarks

This constructor is deprecated. use Message(CharSequence, long, Person)

Constructor

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

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

Notification.MessagingStyle.Message(String, Int64, Person)

Constructor

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;JLandroid/app/Person;)V", "", ApiSince=28)]
public Message(string text, long timestamp, Android.App.Person? sender);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;JLandroid/app/Person;)V", "", ApiSince=28)>]
new Android.App.Notification.MessagingStyle.Message : string * int64 * Android.App.Person -> Android.App.Notification.MessagingStyle.Message

Parameters

text
String

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

timestamp
Int64

long: time 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). The person provided should contain an Icon, set with Person.Builder.setIcon(Icon) and also have a name provided with Person.Builder.setName(CharSequence). If multiple users have the same name, consider providing a key with Person.Builder.setKey(String) in order to differentiate between the different users.

Attributes

Remarks

Constructor

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

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

Notification.MessagingStyle.Message(String, Int64, String)

This constructor is deprecated.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;JLjava/lang/CharSequence;)V", "", ApiSince=24)]
public Message(string text, long timestamp, string sender);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;JLjava/lang/CharSequence;)V", "", ApiSince=24)>]
new Android.App.Notification.MessagingStyle.Message : string * int64 * string -> Android.App.Notification.MessagingStyle.Message

Parameters

text
String

CharSequence: A CharSequence to be displayed as the message content

timestamp
Int64

long: Time 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 MessagingStyle.getUserDisplayName(). Should be unique amongst all individuals in the conversation, and should be consistent during re-posts of the notification.

Attributes

Remarks

This constructor is deprecated. use Message(CharSequence, long, Person)

Constructor

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

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