RenderOutput.Builder


public static final class RenderOutput.Builder
extends Object

java.lang.Object
   ↳ android.adservices.ondevicepersonalization.RenderOutput.Builder


A builder for RenderOutput

Summary

Public constructors

Builder()

Public methods

RenderOutput build()

Builds the instance.

RenderOutput.Builder setContent(String value)

The HTML content to be rendered in a webview.

RenderOutput.Builder setTemplateId(String value)

A key in the REMOTE_DATA IsolatedService#getRemoteData(RequestToken) table that points to an Apache Velocity template.

RenderOutput.Builder setTemplateParams(PersistableBundle value)

The parameters to be populated in the template from RenderOutput.getTemplateId().

Inherited methods

Public constructors

Builder

Added in API level 35
public Builder ()

Public methods

build

Added in API level 35
public RenderOutput build ()

Builds the instance. This builder should not be touched after calling this!

Returns
RenderOutput This value cannot be null.

setContent

Added in API level 35
public RenderOutput.Builder setContent (String value)

The HTML content to be rendered in a webview. If this is null, the ODP service generates HTML from the data in RenderOutput.getTemplateId() and RenderOutput.getTemplateParams() as described below.

Parameters
value String: This value may be null.

Returns
RenderOutput.Builder

setTemplateId

Added in API level 35
public RenderOutput.Builder setTemplateId (String value)

A key in the REMOTE_DATA IsolatedService#getRemoteData(RequestToken) table that points to an Apache Velocity template. This is ignored if RenderOutput.getContent() is not null.

Parameters
value String: This value may be null.

Returns
RenderOutput.Builder

setTemplateParams

Added in API level 35
public RenderOutput.Builder setTemplateParams (PersistableBundle value)

The parameters to be populated in the template from RenderOutput.getTemplateId(). This is ignored if RenderOutput.getContent() is not null.

Parameters
value PersistableBundle: This value cannot be null.

Returns
RenderOutput.Builder