Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
A convenience builder for aggregation suggestion content URIs.
Summary
Public constructors
Public methods
build
fun build(): Uri!
Combine all of the options that have been set and return a new Uri
object for fetching aggregation suggestions.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ContactsContract.Contacts.AggregationSuggestions.Builder\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/provider/ContactsContract.Contacts.AggregationSuggestions.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|--------------------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.provider.ContactsContract.Contacts.AggregationSuggestions.Builder](#) |\n\nA convenience builder for aggregation suggestion content URIs.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|----------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ContactsContract.Contacts.AggregationSuggestions.Builder](#)! | [addNameParameter](#addNameParameter(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Add a name to be used when searching for aggregation suggestions. |\n| [Uri](../net/Uri.html#)! | [build](#build())`()` Combine all of the options that have been set and return a new [Uri](../net/Uri.html#) object for fetching aggregation suggestions. |\n| [ContactsContract.Contacts.AggregationSuggestions.Builder](#)! | [setContactId](#setContactId(kotlin.Long))`(`contactId:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Optional existing contact ID. |\n| [ContactsContract.Contacts.AggregationSuggestions.Builder](#)! | [setLimit](#setLimit(kotlin.Int))`(`limit:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the Maximum number of suggested aggregations that should be returned. |\n\nPublic constructors\n-------------------\n\n### Builder\n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### addNameParameter\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun addNameParameter(name: String!): ContactsContract.Contacts.AggregationSuggestions.Builder!\n```\n\nAdd a name to be used when searching for aggregation suggestions.\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------|\n| `name` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: name to find aggregation suggestions for |\n\n| Return ||\n|----------------------------------------------------------------|-----------------------------------------------------------------------|\n| [ContactsContract.Contacts.AggregationSuggestions.Builder](#)! | This Builder object to allow for chaining of calls to builder methods |\n\n### build\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): Uri!\n```\n\nCombine all of the options that have been set and return a new [Uri](../net/Uri.html#) object for fetching aggregation suggestions. \n\n### setContactId\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setContactId(contactId: Long): ContactsContract.Contacts.AggregationSuggestions.Builder!\n```\n\nOptional existing contact ID. If it is not provided, the search will be based exclusively on the values supplied with [addNameParameter](#addNameParameter(kotlin.String)).\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------|\n| `contactId` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): contact to find aggregation suggestions for |\n\n| Return ||\n|----------------------------------------------------------------|-----------------------------------------------------------------------|\n| [ContactsContract.Contacts.AggregationSuggestions.Builder](#)! | This Builder object to allow for chaining of calls to builder methods |\n\n### setLimit\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setLimit(limit: Int): ContactsContract.Contacts.AggregationSuggestions.Builder!\n```\n\nSets the Maximum number of suggested aggregations that should be returned.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------------------|\n| `limit` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The maximum number of suggested aggregations |\n\n| Return ||\n|----------------------------------------------------------------|-----------------------------------------------------------------------|\n| [ContactsContract.Contacts.AggregationSuggestions.Builder](#)! | This Builder object to allow for chaining of calls to builder methods |"]]