AdSelectionOutcome.Builder


public static final class AdSelectionOutcome.Builder
extends Object

java.lang.Object
   ↳ android.adservices.adselection.AdSelectionOutcome.Builder


This class was deprecated in API level 37.
The Rubidium (Rb) Relevance APIs, including those in android.adservices.adselection, are being deprecated. Relevance APIs have no direct replacement. Developers should stop using them, as calls will be rejected in future Android releases. Please refer to official Privacy Sandbox documentation for deprecation and roadmap details: https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/

Builder for AdSelectionOutcome objects.

Summary

Public constructors

Builder()

Public methods

AdSelectionOutcome build()

Builds a AdSelectionOutcome instance.

AdSelectionOutcome.Builder setAdSelectionId(long adSelectionId)

Sets the mAdSelectionId.

AdSelectionOutcome.Builder setComponentAdUris(List<Uri> componentAdUris)

Sets the list of ad component renderUris.

AdSelectionOutcome.Builder setRenderUri(Uri renderUri)

Sets the RenderUri.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

Added in API level 34
Also in Ad Services Extensions 4
Deprecated in API level 37
public AdSelectionOutcome build ()

Builds a AdSelectionOutcome instance.

Returns
AdSelectionOutcome This value cannot be null.

Throws
IllegalArgumentException if the adSelectionIid is not set
NullPointerException if the RenderUri is null

setAdSelectionId

Added in API level 34
Also in Ad Services Extensions 4
Deprecated in API level 37
public AdSelectionOutcome.Builder setAdSelectionId (long adSelectionId)

Sets the mAdSelectionId.

Parameters
adSelectionId long

Returns
AdSelectionOutcome.Builder This value cannot be null.

setComponentAdUris

Added in API level 36
Also in Ad Services Extensions 16
Deprecated in API level 37
public AdSelectionOutcome.Builder setComponentAdUris (List<Uri> componentAdUris)

Sets the list of ad component renderUris.

Parameters
componentAdUris List: This value cannot be null.

Returns
AdSelectionOutcome.Builder This value cannot be null.

setRenderUri

Added in API level 34
Also in Ad Services Extensions 4
Deprecated in API level 37
public AdSelectionOutcome.Builder setRenderUri (Uri renderUri)

Sets the RenderUri.

Parameters
renderUri Uri: This value cannot be null.

Returns
AdSelectionOutcome.Builder This value cannot be null.