ContactsContract.Contacts.AggregationSuggestions


public static final class ContactsContract.Contacts.AggregationSuggestions
extends Object implements BaseColumns, ContactsContract.ContactOptionsColumns, ContactsContract.ContactStatusColumns, ContactsContract.ContactsColumns

java.lang.Object
   ↳ android.provider.ContactsContract.Contacts.AggregationSuggestions


A read-only sub-directory of a single contact aggregate that contains all aggregation suggestions (other contacts). The aggregation suggestions are computed based on approximate data matches with this contact.

Note: this query may be expensive! If you need to use it in bulk, make sure the user experience is acceptable when the query runs for a long time.

Usage example:

 Uri uri = Contacts.CONTENT_URI.buildUpon()
          .appendEncodedPath(String.valueOf(contactId))
          .appendPath(Contacts.AggregationSuggestions.CONTENT_DIRECTORY)
          .appendQueryParameter("limit", "3")
          .build()
 Cursor cursor = getContentResolver().query(suggestionsUri,
          new String[] {Contacts.DISPLAY_NAME, Contacts._ID, Contacts.LOOKUP_KEY},
          null, null, null);
 

This directory can be used either with a ContactsContract.Contacts.CONTENT_URI or ContactsContract.Contacts.CONTENT_LOOKUP_URI.

Summary

Nested classes

class ContactsContract.Contacts.AggregationSuggestions.Builder

A convenience builder for aggregation suggestion content URIs. 

Constants

String CONTENT_DIRECTORY

The directory twig for this sub-table.

Inherited constants

String _COUNT

The count of rows in a directory.

String _ID

The unique ID for a row.

String CUSTOM_RINGTONE

URI for a custom ringtone associated with the contact.

String LAST_TIME_CONTACTED

This constant was deprecated in API level 29. Contacts affinity information is no longer supported as of Android version Build.VERSION_CODES.Q. This column always contains 0.

String PINNED

The position at which the contact is pinned.

String SEND_TO_VOICEMAIL

Whether the contact should always be sent to voicemail.

String STARRED

Is the contact starred?

Type: INTEGER (boolean)

String TIMES_CONTACTED

This constant was deprecated in API level 29. Contacts affinity information is no longer supported as of Android version Build.VERSION_CODES.Q. This column always contains 0.

String CONTACT_CHAT_CAPABILITY

Contact Chat Capabilities.

String CONTACT_PRESENCE

Contact presence status.

String CONTACT_STATUS

Contact's latest status update.

String CONTACT_STATUS_ICON

The resource ID of the icon for the source of contact status.

String CONTACT_STATUS_LABEL

The resource ID of the label describing the source of contact status, e.g. "Google Talk".

String CONTACT_STATUS_RES_PACKAGE

The package containing resources for this status: label and icon.

String CONTACT_STATUS_TIMESTAMP

The absolute time in milliseconds when the latest status was inserted/updated.

String CONTACT_LAST_UPDATED_TIMESTAMP

Timestamp (milliseconds since epoch) of when this contact was last updated.

String DISPLAY_NAME

The display name for the contact.

String HAS_PHONE_NUMBER

An indicator of whether this contact has at least one phone number.

String IN_DEFAULT_DIRECTORY

Flag that reflects whether the contact exists inside the default directory.

String IN_VISIBLE_GROUP

Flag that reflects the Groups.GROUP_VISIBLE state of any CommonDataKinds.GroupMembership for this contact.

String IS_USER_PROFILE

Flag that reflects whether this contact represents the user's personal profile entry.

String LOOKUP_KEY

An opaque value that contains hints on how to find the contact if its row id changed as a result of a sync or aggregation.

String NAME_RAW_CONTACT_ID

Reference to the row in the RawContacts table holding the contact name.

String PHOTO_FILE_ID

Photo file ID of the full-size photo.

String PHOTO_ID

Reference to the row in the data table holding the photo.

String PHOTO_THUMBNAIL_URI

A URI that can be used to retrieve a thumbnail of the contact's photo.

String PHOTO_URI

A URI that can be used to retrieve the contact's full-size photo.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

CONTENT_DIRECTORY

Added in API level 5
public static final String CONTENT_DIRECTORY

The directory twig for this sub-table. The URI can be followed by an optional type-to-filter, similar to ContactsContract.Contacts.CONTENT_FILTER_URI.

Constant Value: "suggestions"