語言

Notification.Builder.AddPerson 方法

定義

多載

名稱 Description
AddPerson(Person)

請新增與此通知相關的人員。

AddPerson(String)

此方法在 API 等級 28 中被棄用。

AddPerson(Person)

請新增與此通知相關的人員。

[Android.Runtime.Register("addPerson", "(Landroid/app/Person;)Landroid/app/Notification$Builder;", "GetAddPerson_Landroid_app_Person_Handler", ApiSince=28)]
public virtual Android.App.Notification.Builder AddPerson(Android.App.Person? person);
[<Android.Runtime.Register("addPerson", "(Landroid/app/Person;)Landroid/app/Notification$Builder;", "GetAddPerson_Landroid_app_Person_Handler", ApiSince=28)>]
abstract member AddPerson : Android.App.Person -> Android.App.Notification.Builder
override this.AddPerson : Android.App.Person -> Android.App.Notification.Builder

參數

person
Person

人物:要加入的人

傳回

這個 Android.App.Notification.Builder 實例,允許通話串接。

屬性

備註

請新增與此通知相關的人員。 根據使用者偏好,若通知屬於類別Notification.CATEGORY_CALL或Notification.CATEGORY_MESSAGE,此註解可能會允許通知通過中斷過濾器。 新增人員也可能使此通知在使用者介面中更顯眼。

通常應該包含一個 URI,才能從排名提升中受益。 不過,即使沒有提供 URI,通知中也應該包含其他人,讓聽眾和純語音裝置能正確公告和處理。

另請參閱:

Android 參考資料。android.app.Notification.Builder.addPerson

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

AddPerson(String)

此方法在 API 等級 28 中被棄用。

[Android.Runtime.Register("addPerson", "(Ljava/lang/String;)Landroid/app/Notification$Builder;", "GetAddPerson_Ljava_lang_String_Handler")]
public virtual Android.App.Notification.Builder? AddPerson(string? uri);
[<Android.Runtime.Register("addPerson", "(Ljava/lang/String;)Landroid/app/Notification$Builder;", "GetAddPerson_Ljava_lang_String_Handler")>]
abstract member AddPerson : string -> Android.App.Notification.Builder
override this.AddPerson : string -> Android.App.Notification.Builder

參數

uri
String

字串:為該人提供的 URI

傳回

這個 Android.App.Notification.Builder 實例,允許通話串接。

屬性

備註

此方法在 API 等級 28 中被棄用。 使用 addPerson(Person)

請新增與此通知相關的人員。 根據使用者偏好,若通知屬於類別Notification.CATEGORY_CALL或Notification.CATEGORY_MESSAGE,此註解可能會允許通知通過中斷過濾器。 新增人員也可能使此通知在使用者介面中更顯眼。

該人物應由字串表示的 ContactsContract.Contacts.CONTENT_LOOKUP_URI 來指定。

系統也會嘗試解析 mailto: 和 tel: schema URI。 這些 URI 的路徑部分必須存在於聯絡人資料庫中,且在適當的欄位中,否則該參考將被視為無效而被丟棄。 電話結構的 URI 將由 ContactsContract.PhoneLookup 解析。 也可以提供帶有結構名稱的 URI:,以便在聯絡人資料庫中沒有條目的情況下,唯一識別個人。

另請參閱:

Android 參考資料。android.app.Notification.Builder.addPerson

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於