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。 這個值不可能為零值。
- timestamp
- Int64
長篇:訊息抵達的時間
- sender
- Person
人物:發送訊息的人。 目前使用者的訊息應該會是空,此時平台會在 MessagingStyle(Person) 中插入使用者集。 所提供的人物應該包含一個圖示,該圖示以 Person.Builder.setIcon(Icon),並且名稱也必須以 Person.Builder.setName(CharSequence)為基礎。 如果有多個使用者有相同名稱,建議提供 Person.Builder.setKey(String) 的金鑰,以區分不同使用者。
- 屬性
備註
建構函式
Android 參考資料。android.app.Notification.MessagingStyle.Message.Message
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
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
長:訊息抵達的時間
- sender
- ICharSequence
CharSequence:用於顯示寄件者姓名的 CharSequence。 目前使用者的訊息應該會為空,此時平台會插入 MessagingStyle.getUserDisplayName()。 在對話中所有成員中,應該是獨一無二的,且在重新發布通知時應保持一致。
- 屬性
備註
此構造器已被棄用。 使用 Message(CharSequence, long, Person)
建構函式
Android 參考資料。android.app.Notification.MessagingStyle.Message.Message
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
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。 這個值不可能為零值。
- timestamp
- Int64
長篇:訊息抵達的時間
- sender
- Person
人物:發送訊息的人。 目前使用者的訊息應該會是空,此時平台會在 MessagingStyle(Person) 中插入使用者集。 所提供的人物應該包含一個圖示,該圖示以 Person.Builder.setIcon(Icon),並且名稱也必須以 Person.Builder.setName(CharSequence)為基礎。 如果有多個使用者有相同名稱,建議提供 Person.Builder.setKey(String) 的金鑰,以區分不同使用者。
- 屬性
備註
建構函式
Android 參考資料。android.app.Notification.MessagingStyle.Message.Message
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
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
長:訊息抵達的時間
- sender
- String
CharSequence:用於顯示寄件者姓名的 CharSequence。 目前使用者的訊息應該會為空,此時平台會插入 MessagingStyle.getUserDisplayName()。 在對話中所有成員中,應該是獨一無二的,且在重新發布通知時應保持一致。
- 屬性
備註
此構造器已被棄用。 使用 Message(CharSequence, long, Person)
建構函式
Android 參考資料。android.app.Notification.MessagingStyle.Message.Message
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。