Notification.Builder.AddPerson Method

Definition

Overloads

Name Description
AddPerson(Person)

Add a person that is relevant to this notification.

AddPerson(String)

This method was deprecated in API level 28.

AddPerson(Person)

Add a person that is relevant to this notification.

[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

Parameters

person
Person

Person: the person to add

Returns

This Android.App.Notification.Builder instance, allowing calls to be chained.

Attributes

Remarks

Add a person that is relevant to this notification. Depending on user preferences, this annotation may allow the notification to pass through interruption filters, if this notification is of category Notification.CATEGORY_CALL or Notification.CATEGORY_MESSAGE. The addition of people may also cause this notification to appear more prominently in the user interface.

A person should usually contain a uri in order to benefit from the ranking boost. However, even if no uri is provided, it's beneficial to provide other people in the notification, such that listeners and voice only devices can announce and handle them properly.

See also:

Android reference for android.app.Notification.Builder.addPerson.

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

AddPerson(String)

This method was deprecated in API level 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

Parameters

uri
String

String: a URI for the person

Returns

This Android.App.Notification.Builder instance, allowing calls to be chained.

Attributes

Remarks

This method was deprecated in API level 28. use addPerson(Person)

Add a person that is relevant to this notification. Depending on user preferences, this annotation may allow the notification to pass through interruption filters, if this notification is of category Notification.CATEGORY_CALL or Notification.CATEGORY_MESSAGE. The addition of people may also cause this notification to appear more prominently in the user interface.

The person should be specified by the String representation of a ContactsContract.Contacts.CONTENT_LOOKUP_URI.

The system will also attempt to resolve mailto: and tel: schema URIs. The path part of these URIs must exist in the contacts database, in the appropriate column, or the reference will be discarded as invalid. Telephone schema URIs will be resolved by ContactsContract.PhoneLookup. It is also possible to provide a URI with the schema name: in order to uniquely identify a person without an entry in the contacts database.

See also:

Android reference for android.app.Notification.Builder.addPerson.

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