@Document(name = "builtin:Person")
public class Person extends Thing


AppSearch document representing a Person entity modeled after Person.

The Person document includes commonly searchable properties such as name, organization, and notes, as well as contact information such as phone numbers, email addresses, etc, grouped by their label. The labeled contact information is present in a nested ContactPoint document.

Summary

Nested types

Holds type information for additional names for Person.

public final class Person.Builder

Builder class for Person.

Public methods

@NonNull List<String>

Returns a list of additional names for this Person.

@NonNull List<String>

Returns a list of affiliation for this Person.

@NonNull List<ContactPoint>

Returns a list of ContactPoint.

@Nullable Uri

Returns an external uri for this Person.

@Nullable String

Returns the family (or last) name for this Person.

@Nullable String

Returns the given (or first) name for this Person.

@Nullable Uri

Returns Uri of the profile image for this Person.

@Nullable String

Returns the middle name(s) for this Person.

@NonNull List<String>

Returns the notes about this Person.

@NonNull List<String>

Returns a list of relations for this Person, like "Father" or "Mother".

@NonNull List<Person.AdditionalName>

Returns a list of AdditionalName for this Person.

boolean

Returns whether this Person is a machine rather than a human.

boolean

Returns whether this Person is important to the user of this device with regards to how frequently they interact.

Inherited methods

From androidx.appsearch.builtintypes.Thing
@NonNull List<String>

Returns an unmodifiable list of aliases, if any, for this item.

long

Returns the creation timestamp, in milliseconds since Unix epoch, of this item.

@Nullable String

Returns a description of this item.

int

Returns the intrinsic score (or importance) of this item.

long

Returns the time-to-live timestamp, in milliseconds since getCreationTimestampMillis, for this item.

@NonNull String

Returns the unique identifier for this item.

@Nullable String

Returns the URL for an image of this item.

@Nullable String

Returns the name of this item.

@NonNull String

Returns the namespace (or logical grouping) for this item.

@NonNull List<PotentialAction>

Returns the actions that can be taken on this object.

@Nullable String

Returns the deeplink URL of this item.

Public methods

getAdditionalNames

Added in 1.1.0-alpha06
public @NonNull List<StringgetAdditionalNames()

Returns a list of additional names for this Person.

Additional names can include something like phonetic names, or nicknames.

Different from getTypedAdditionalNames, the return value doesn't include type information for the additional names.

getAffiliations

Added in 1.1.0-alpha06
public @NonNull List<StringgetAffiliations()

Returns a list of affiliation for this Person. Like company, school, etc.

For a contact with the title "Software Engineer" in a department "Engineering" at a company "Cloud Company", this can include a flattened value of "Software Engineer, Engineering, Cloud Company".

getContactPoints

Added in 1.1.0-alpha06
public @NonNull List<ContactPointgetContactPoints()

Returns a list of ContactPoint.

More information can be found in ContactPoint.

getExternalUri

Added in 1.1.0-alpha06
public @Nullable Uri getExternalUri()

Returns an external uri for this Person. Or null if no Uri is provided. A Uri can be any of the following:

For mailto: and tel: URI schemes, it is recommended that the path portion refers to a valid contact in the Contacts Provider.

getFamilyName

Added in 1.1.0-alpha06
public @Nullable String getFamilyName()

Returns the family (or last) name for this Person.

getGivenName

Added in 1.1.0-alpha06
public @Nullable String getGivenName()

Returns the given (or first) name for this Person.

getImageUri

Added in 1.1.0-alpha06
public @Nullable Uri getImageUri()

Returns Uri of the profile image for this Person.

getMiddleName

Added in 1.1.0-alpha06
public @Nullable String getMiddleName()

Returns the middle name(s) for this Person.

For a Person with multiple middle names, this method returns a flattened and whitespace separated list. For example, "middle1 middle2 ..."

getNotes

Added in 1.1.0-alpha06
public @NonNull List<StringgetNotes()

Returns the notes about this Person.

getRelations

Added in 1.1.0-alpha06
public @NonNull List<StringgetRelations()

Returns a list of relations for this Person, like "Father" or "Mother".

getTypedAdditionalNames

Added in 1.1.0-alpha06
public @NonNull List<Person.AdditionalNamegetTypedAdditionalNames()

Returns a list of AdditionalName for this Person.

Additional names can include something like phonetic names, or nicknames.

Each AdditionalName contains type information for the additional name.

isBot

Added in 1.1.0-alpha06
public boolean isBot()

Returns whether this Person is a machine rather than a human.

isImportant

Added in 1.1.0-alpha06
public boolean isImportant()

Returns whether this Person is important to the user of this device with regards to how frequently they interact.