Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
A builder for RenderOutput
Summary
Public constructors
Public methods
build
fun build(): RenderOutput
Builds the instance. This builder should not be touched after calling this!
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,["# RenderOutput.Builder\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/ondevicepersonalization/RenderOutput.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.ondevicepersonalization.RenderOutput.Builder](#) |\n\nA builder for [RenderOutput](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput)\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [RenderOutput](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput) | [build](#build())`()` Builds the instance. |\n| [RenderOutput.Builder](#) | [setContent](#setContent(kotlin.String))`(`value:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` The HTML content to be rendered in a webview. |\n| [RenderOutput.Builder](#) | [setTemplateId](#setTemplateId(kotlin.String))`(`value:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` A key in the REMOTE_DATA [IsolatedService.getRemoteData(RequestToken)](/reference/kotlin/android/adservices/ondevicepersonalization/IsolatedService#getRemoteData(android.adservices.ondevicepersonalization.RequestToken)) table that points to an [Apache Velocity](/reference/kotlin/android/adservices/ondevicepersonalization/velocity.apache.org) template. |\n| [RenderOutput.Builder](#) | [setTemplateParams](#setTemplateParams(android.os.PersistableBundle))`(`value:` `[PersistableBundle](../../os/PersistableBundle.html#)`)` The parameters to be populated in the template from [getTemplateId()](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput#getTemplateId()). |\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) \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) \n\n```\nfun build(): RenderOutput\n```\n\nBuilds the instance. This builder should not be touched after calling this!\n\n| Return ||\n|-------------------------------------------------------------------------------------------|------------------------------|\n| [RenderOutput](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput) | This value cannot be `null`. |\n\n### setContent\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setContent(value: String?): RenderOutput.Builder\n```\n\nThe HTML content to be rendered in a webview. If this is null, the ODP service generates HTML from the data in [getTemplateId()](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput#getTemplateId()) and [getTemplateParams()](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput#getTemplateParams()) as described below.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------|\n| `value` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?: This value may be `null`. |\n\n### setTemplateId\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setTemplateId(value: String?): RenderOutput.Builder\n```\n\nA key in the REMOTE_DATA [IsolatedService.getRemoteData(RequestToken)](/reference/kotlin/android/adservices/ondevicepersonalization/IsolatedService#getRemoteData(android.adservices.ondevicepersonalization.RequestToken)) table that points to an [Apache Velocity](/reference/kotlin/android/adservices/ondevicepersonalization/velocity.apache.org) template. This is ignored if [getContent()](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput#getContent()) is not null.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------|\n| `value` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?: This value may be `null`. |\n\n### setTemplateParams\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setTemplateParams(value: PersistableBundle): RenderOutput.Builder\n```\n\nThe parameters to be populated in the template from [getTemplateId()](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput#getTemplateId()). This is ignored if [getContent()](/reference/kotlin/android/adservices/ondevicepersonalization/RenderOutput#getContent()) is not null.\n\n| Parameters ||\n|---------|-------------------------------------------------------------------------------------|\n| `value` | [PersistableBundle](../../os/PersistableBundle.html#): This value cannot be `null`. |"]]