Notification.Builder.AddPerson 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| 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
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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的 String 表示形式指定。
系统还将尝试解析 mailto:和 tel: 架构 URI。 这些 URI 的路径部分必须存在于联系人数据库中、相应列中,否则引用将被丢弃为无效。 电话架构 URI 将由 ContactsContract.PhoneLookup 解析。 还可以提供具有架构名称的 URI:以便唯一标识联系人数据库中没有条目的人员。
Android 参考。android.app.Notification.Builder.addPerson
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。