Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for GetTopicsRequest
objects.
Summary
Public constructors
Public methods
setAdsSdkName
fun setAdsSdkName(adsSdkName: String): GetTopicsRequest.Builder
Set Ads Sdk Name.
This must be called by SDKs running outside of the Sandbox. Other clients must not call it.
Parameters |
adsSdkName |
String: the Ads Sdk Name. This value cannot be null . |
setShouldRecordObservation
fun setShouldRecordObservation(recordObservation: Boolean): GetTopicsRequest.Builder
Set the Record Observation.
Parameters |
recordObservation |
Boolean: whether to record that the caller has observed the topics of the host app or not. This will be used to determine if the caller can receive the topic in the next epoch. |
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.
[[["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-02-10 UTC."],[],[],null,["# GetTopicsRequest.Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/topics/GetTopicsRequest.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.topics.GetTopicsRequest.Builder](#) |\n\nBuilder for [GetTopicsRequest](/reference/kotlin/android/adservices/topics/GetTopicsRequest) objects.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder())`()` Creates a [Builder](#) for [GetTopicsRequest](/reference/kotlin/android/adservices/topics/GetTopicsRequest) objects. |\n\n| Public methods ||\n|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [GetTopicsRequest](/reference/kotlin/android/adservices/topics/GetTopicsRequest) | [build](#build())`()` Builds a [GetTopicsRequest](/reference/kotlin/android/adservices/topics/GetTopicsRequest) instance. |\n| [GetTopicsRequest.Builder](#) | [setAdsSdkName](#setAdsSdkName(kotlin.String))`(`adsSdkName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Set Ads Sdk Name. |\n| [GetTopicsRequest.Builder](#) | [setShouldRecordObservation](#setShouldRecordObservation(kotlin.Boolean))`(`recordObservation:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Set the Record Observation. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions) \n\n```\nBuilder()\n```\n\nCreates a [Builder](#) for [GetTopicsRequest](/reference/kotlin/android/adservices/topics/GetTopicsRequest) objects.\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions) \n\n```\nfun build(): GetTopicsRequest\n```\n\nBuilds a [GetTopicsRequest](/reference/kotlin/android/adservices/topics/GetTopicsRequest) instance.\n\n| Return ||\n|----------------------------------------------------------------------------------|------------------------------|\n| [GetTopicsRequest](/reference/kotlin/android/adservices/topics/GetTopicsRequest) | This value cannot be `null`. |\n\n### setAdsSdkName\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 4](https://developer.android.com/sdkExtensions) \n\n```\nfun setAdsSdkName(adsSdkName: String): GetTopicsRequest.Builder\n```\n\nSet Ads Sdk Name.\n\nThis must be called by SDKs running outside of the Sandbox. Other clients must not call it.\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------|\n| `adsSdkName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): the Ads Sdk Name. This value cannot be `null`. |\n\n| Return ||\n|-------------------------------|------------------------------|\n| [GetTopicsRequest.Builder](#) | This value cannot be `null`. |\n\n### setShouldRecordObservation\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 5](https://developer.android.com/sdkExtensions) \n\n```\nfun setShouldRecordObservation(recordObservation: Boolean): GetTopicsRequest.Builder\n```\n\nSet the Record Observation.\n\n| Parameters ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `recordObservation` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): whether to record that the caller has observed the topics of the host app or not. This will be used to determine if the caller can receive the topic in the next epoch. |\n\n| Return ||\n|-------------------------------|------------------------------|\n| [GetTopicsRequest.Builder](#) | This value cannot be `null`. |"]]