Person

Added in 1.1.0

class Person


Provides an immutable reference to an entity that appears repeatedly on different surfaces of the platform. For example, this could represent the sender of a message.

Summary

Nested types

Builder for the immutable Person class.

Public functions

Boolean
equals(otherObject: Any?)
java-static Person
fromBundle(bundle: Bundle)

Extracts and returns the Person written to the bundle.

IconCompat?

Returns the icon for this Person or null if no icon was provided.

String?

Returns the key for this Person or null if no key was provided.

CharSequence?

Returns the name for this Person or null if no name was provided.

String?

Returns the raw URI for this Person or null if no URI was provided.

Int
Boolean

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

Boolean

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

Person.Builder

Creates and returns a new Builder initialized with this Person's data.

Bundle

Writes and returns a new Bundle that represents this Person.

Public functions

equals

fun equals(otherObject: Any?): Boolean

fromBundle

Added in 1.1.0
java-static fun fromBundle(bundle: Bundle): Person

Extracts and returns the Person written to the bundle. A bundle can be created from a Person using toBundle.

getIcon

Added in 1.1.0
fun getIcon(): IconCompat?

Returns the icon for this Person or null if no icon was provided.

getKey

Added in 1.1.0
fun getKey(): String?

Returns the key for this Person or null if no key was provided. This is provided as a unique identifier between other Persons.

getName

Added in 1.1.0
fun getName(): CharSequence?

Returns the name for this Person or null if no name was provided. This could be a full name, nickname, username, etc.

getUri

Added in 1.1.0
fun getUri(): String?

Returns the raw URI for this Person or null if no URI was provided. A URI can be any of the following:

*Note for these schemas, the path portion of the URI must exist in the contacts database in their appropriate column, otherwise the reference should be discarded.

hashCode

fun hashCode(): Int

isBot

Added in 1.1.0
fun isBot(): Boolean

Returns whether or not this Person is a machine rather than a human. Used primarily to identify automated tooling.

isImportant

Added in 1.1.0
fun isImportant(): Boolean

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

toBuilder

Added in 1.1.0
fun toBuilder(): Person.Builder

Creates and returns a new Builder initialized with this Person's data.

toBundle

Added in 1.1.0
fun toBundle(): Bundle

Writes and returns a new Bundle that represents this Person. This bundle can be converted back by using fromBundle.