Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for GetAdSelectionDataRequest
objects.
Summary
Public constructors
Public methods
setCoordinatorOriginUri
fun setCoordinatorOriginUri(coordinatorOriginUri: Uri?): GetAdSelectionDataRequest.Builder
Sets the coordinator origin from which PPAPI should fetch the public key for payload encryption. The origin must use HTTPS URI.
The origin will only contain the scheme, hostname and port of the URL. If the origin is not provided or is null, PPAPI will use the default coordinator URI.
The origin must belong to a list of pre-approved coordinator origins. Otherwise, AdSelectionManager.getAdSelectionData
will throw an IllegalArgumentException
Parameters |
coordinatorOriginUri |
Uri?: This value may be null . |
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-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# GetAdSelectionDataRequest.Builder\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/adselection/GetAdSelectionDataRequest.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.adservices.adselection.GetAdSelectionDataRequest.Builder](#) |\n\nBuilder for [GetAdSelectionDataRequest](/reference/kotlin/android/adservices/adselection/GetAdSelectionDataRequest) objects.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [GetAdSelectionDataRequest](/reference/kotlin/android/adservices/adselection/GetAdSelectionDataRequest) | [build](#build())`()` Builds a [GetAdSelectionDataRequest](/reference/kotlin/android/adservices/adselection/GetAdSelectionDataRequest) instance. |\n| [GetAdSelectionDataRequest.Builder](#) | [setCoordinatorOriginUri](#setCoordinatorOriginUri(android.net.Uri))`(`coordinatorOriginUri:` `[Uri](../../net/Uri.html#)?`)` Sets the coordinator origin from which PPAPI should fetch the public key for payload encryption. |\n| [GetAdSelectionDataRequest.Builder](#) | [setSeller](#setSeller(android.adservices.common.AdTechIdentifier))`(`seller:` `[AdTechIdentifier](../common/AdTechIdentifier.html#)?`)` Sets the seller [AdTechIdentifier](../common/AdTechIdentifier.html#). |\n| [GetAdSelectionDataRequest.Builder](#) | [setSellerConfiguration](#setSellerConfiguration(android.adservices.adselection.SellerConfiguration))`(`sellerConfiguration:` `[SellerConfiguration](/reference/kotlin/android/adservices/adselection/SellerConfiguration)?`)` Sets the [SellerConfiguration](/reference/kotlin/android/adservices/adselection/SellerConfiguration). |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions) \n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions) \n\n```\nfun build(): GetAdSelectionDataRequest\n```\n\nBuilds a [GetAdSelectionDataRequest](/reference/kotlin/android/adservices/adselection/GetAdSelectionDataRequest) instance.\n\n| Return ||\n|---------------------------------------------------------------------------------------------------------|------------------------------|\n| [GetAdSelectionDataRequest](/reference/kotlin/android/adservices/adselection/GetAdSelectionDataRequest) | This value cannot be `null`. |\n\n### setCoordinatorOriginUri\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 12](https://developer.android.com/sdkExtensions) \n\n```\nfun setCoordinatorOriginUri(coordinatorOriginUri: Uri?): GetAdSelectionDataRequest.Builder\n```\n\nSets the coordinator origin from which PPAPI should fetch the public key for payload encryption. The origin must use HTTPS URI.\n\nThe origin will only contain the scheme, hostname and port of the URL. If the origin is not provided or is null, PPAPI will use the default coordinator URI.\n\nThe origin must belong to a list of pre-approved coordinator origins. Otherwise, [AdSelectionManager.getAdSelectionData](/reference/kotlin/android/adservices/adselection/AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver)) will throw an IllegalArgumentException\n\n| Parameters ||\n|------------------------|--------------------------------------------------------|\n| `coordinatorOriginUri` | [Uri](../../net/Uri.html#)?: This value may be `null`. |\n\n### setSeller\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions) \n\n```\nfun setSeller(seller: AdTechIdentifier?): GetAdSelectionDataRequest.Builder\n```\n\nSets the seller [AdTechIdentifier](../common/AdTechIdentifier.html#).\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------|\n| `seller` | [AdTechIdentifier](../common/AdTechIdentifier.html#)?: This value may be `null`. |\n\n| Return ||\n|----------------------------------------|------------------------------|\n| [GetAdSelectionDataRequest.Builder](#) | This value cannot be `null`. |\n\n### setSellerConfiguration\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 14](https://developer.android.com/sdkExtensions) \n\n```\nfun setSellerConfiguration(sellerConfiguration: SellerConfiguration?): GetAdSelectionDataRequest.Builder\n```\n\nSets the [SellerConfiguration](/reference/kotlin/android/adservices/adselection/SellerConfiguration). See [getSellerConfiguration()](/reference/kotlin/android/adservices/adselection/GetAdSelectionDataRequest#getSellerConfiguration()) for more details.\n\n| Parameters ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------|\n| `sellerConfiguration` | [SellerConfiguration](/reference/kotlin/android/adservices/adselection/SellerConfiguration)?: This value may be `null`. |\n\n| Return ||\n|----------------------------------------|------------------------------|\n| [GetAdSelectionDataRequest.Builder](#) | This value cannot be `null`. |"]]