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

Public methods

build

public RenderOutput build ()

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

Returns
RenderOutput This value cannot be null.

setContent

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 cannot be null.

Returns
RenderOutput.Builder

setTemplateId

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 cannot be null.

Returns
RenderOutput.Builder

setTemplateParams

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