Notification.MessagingStyle.Message 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Notification.MessagingStyle.Message(ICharSequence, Int64, Person)
构造函数
[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
参数
- text
- ICharSequence
CharSequence:要显示为消息内容的 CharSequence。 此值不能为 null。
- timestamp
- Int64
long:消息到达的时间
- sender
- Person
人员:发送邮件的人员。 对于当前用户的消息应为 null,在这种情况下,平台将在 MessagingStyle(Person)中插入用户集。 提供的人员应包含一个图标,使用 Person.Builder.setIcon(Icon) 进行设置,并且还包含 Person.Builder.setName(CharSequence)提供的名称。 如果多个用户具有相同的名称,请考虑为 Person.Builder.setKey(String) 提供密钥,以便区分不同的用户。
- 特性
注解
构造函数
Android 参考。android.app.Notification.MessagingStyle.Message.Message
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
Notification.MessagingStyle.Message(ICharSequence, Int64, ICharSequence)
此构造函数已弃用。
[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
参数
- text
- ICharSequence
CharSequence:要显示为消息内容的 CharSequence
- timestamp
- Int64
long: 消息到达的时间
- sender
- ICharSequence
CharSequence:用于显示发件人名称的 CharSequence。 对于当前用户的消息应为 null,在这种情况下,平台将插入 MessagingStyle.getUserDisplayName()。 在对话中的所有个人中应是唯一的,应在通知的重新发布期间保持一致。
- 特性
注解
此构造函数已弃用。 use Message(CharSequence, long, Person)
构造函数
Android 参考。android.app.Notification.MessagingStyle.Message.Message
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
Notification.MessagingStyle.Message(String, Int64, Person)
构造函数
[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
参数
- text
- String
CharSequence:要显示为消息内容的 CharSequence。 此值不能为 null。
- timestamp
- Int64
long:消息到达的时间
- sender
- Person
人员:发送邮件的人员。 对于当前用户的消息应为 null,在这种情况下,平台将在 MessagingStyle(Person)中插入用户集。 提供的人员应包含一个图标,使用 Person.Builder.setIcon(Icon) 进行设置,并且还包含 Person.Builder.setName(CharSequence)提供的名称。 如果多个用户具有相同的名称,请考虑为 Person.Builder.setKey(String) 提供密钥,以便区分不同的用户。
- 特性
注解
构造函数
Android 参考。android.app.Notification.MessagingStyle.Message.Message
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
Notification.MessagingStyle.Message(String, Int64, String)
此构造函数已弃用。
[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
参数
- text
- String
CharSequence:要显示为消息内容的 CharSequence
- timestamp
- Int64
long: 消息到达的时间
- sender
- String
CharSequence:用于显示发件人名称的 CharSequence。 对于当前用户的消息应为 null,在这种情况下,平台将插入 MessagingStyle.getUserDisplayName()。 在对话中的所有个人中应是唯一的,应在通知的重新发布期间保持一致。
- 特性
注解
此构造函数已弃用。 use Message(CharSequence, long, Person)
构造函数
Android 参考。android.app.Notification.MessagingStyle.Message.Message
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。