Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/provider/ContactsContract.Contacts.AggregationSuggestions#nestedclasses) \| [Constants](https://developer.android.com/reference/android/provider/ContactsContract.Contacts.AggregationSuggestions#constants) \| [Inherited Constants](https://developer.android.com/reference/android/provider/ContactsContract.Contacts.AggregationSuggestions#inhconstants) \| [Inherited Methods](https://developer.android.com/reference/android/provider/ContactsContract.Contacts.AggregationSuggestions#inhmethods)

# ContactsContract.Contacts.AggregationSuggestions

*** ** * ** ***


`
public
static
final

class
ContactsContract.Contacts.AggregationSuggestions
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/provider/BaseColumns,

https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns,

https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns,

https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.ContactsContract.Contacts.AggregationSuggestions |

<br />

*** ** * ** ***

<br />


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);
```

<br />


This directory can be used either with a `https://developer.android.com/reference/android/provider/ContactsContract.Contacts#CONTENT_URI` or
`https://developer.android.com/reference/android/provider/ContactsContract.Contacts#CONTENT_LOOKUP_URI`.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/provider/ContactsContract.Contacts.AggregationSuggestions.Builder` A convenience builder for aggregation suggestion content URIs. |

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.Contacts.AggregationSuggestions#CONTENT_DIRECTORY` The directory twig for this sub-table. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/provider/BaseColumns` |---|---| | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/BaseColumns#_COUNT` The count of rows in a directory. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/BaseColumns#_ID` The unique ID for a row. | |
| From interface `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns` |---|---| | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#CUSTOM_RINGTONE` URI for a custom ringtone associated with the contact. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#LAST_TIME_CONTACTED` *This constant was deprecated in API level 29. Contacts affinity information is no longer supported as of Android version `https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q`. This column always contains 0.* | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#PINNED` The position at which the contact is pinned. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#SEND_TO_VOICEMAIL` Whether the contact should always be sent to voicemail. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#STARRED` Is the contact starred? Type: INTEGER (boolean) <br /> | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactOptionsColumns#TIMES_CONTACTED` *This constant was deprecated in API level 29. Contacts affinity information is no longer supported as of Android version `https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q`. This column always contains 0.* | |
| From interface `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns` |---|---| | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_CHAT_CAPABILITY` Contact Chat Capabilities. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_PRESENCE` Contact presence status. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS` Contact's latest status update. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS_ICON` The resource ID of the icon for the source of contact status. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS_LABEL` The resource ID of the label describing the source of contact status, e.g. "Google Talk". | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS_RES_PACKAGE` The package containing resources for this status: label and icon. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactStatusColumns#CONTACT_STATUS_TIMESTAMP` The absolute time in milliseconds when the latest status was inserted/updated. | |
| From interface `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns` |---|---| | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#CONTACT_LAST_UPDATED_TIMESTAMP` Timestamp (milliseconds since epoch) of when this contact was last updated. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#DISPLAY_NAME` The display name for the contact. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#HAS_PHONE_NUMBER` An indicator of whether this contact has at least one phone number. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#IN_DEFAULT_DIRECTORY` Flag that reflects whether the contact exists inside the default directory. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#IN_VISIBLE_GROUP` Flag that reflects the `https://developer.android.com/reference/android/provider/ContactsContract.GroupsColumns#GROUP_VISIBLE` state of any `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.GroupMembership` for this contact. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#IS_USER_PROFILE` Flag that reflects whether this contact represents the user's personal profile entry. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#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. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#NAME_RAW_CONTACT_ID` Reference to the row in the RawContacts table holding the contact name. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_FILE_ID` Photo file ID of the full-size photo. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_ID` Reference to the row in the data table holding the photo. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_THUMBNAIL_URI` A URI that can be used to retrieve a thumbnail of the contact's photo. | | `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.ContactsColumns#PHOTO_URI` A URI that can be used to retrieve the contact's full-size photo. | |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(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` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(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` | ` https://developer.android.com/reference/java/lang/Object#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](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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
`https://developer.android.com/reference/android/provider/ContactsContract.Contacts#CONTENT_FILTER_URI`.

<br />

Constant Value:

"suggestions"