ReportEventRequest.Builder
public
static
final
class
ReportEventRequest.Builder
extends Object
| java.lang.Object | |
| ↳ | android.adservices.adselection.ReportEventRequest.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 ReportEventRequest objects.
Summary
Public constructors | |
|---|---|
Builder(long adSelectionId, String eventKey, String eventData, int reportingDestinations)
|
|
Public methods | |
|---|---|
ReportEventRequest
|
build()
Builds the |
ReportEventRequest.Builder
|
setAdSelectionId(long adSelectionId)
Sets the ad selection ID with which the rendered ad's events are associated. |
ReportEventRequest.Builder
|
setData(String eventData)
Sets the ad event data. |
ReportEventRequest.Builder
|
setInputEvent(InputEvent inputEvent)
Sets the input event associated with the user interaction. |
ReportEventRequest.Builder
|
setKey(String eventKey)
Sets the event key, the type of ad event to be reported. |
ReportEventRequest.Builder
|
setReportingDestinations(int reportingDestinations)
Sets the bitfield of reporting destinations to report to (buyer, seller, or both). |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (long adSelectionId,
String eventKey,
String eventData,
int reportingDestinations)| Parameters | |
|---|---|
adSelectionId |
long |
eventKey |
String: This value cannot be null. |
eventData |
String: This value cannot be null. |
reportingDestinations |
int: Value is either 0 or a combination of the following:
|
Public methods
build
public ReportEventRequest build ()
Builds the ReportEventRequest object.
| Returns | |
|---|---|
ReportEventRequest |
This value cannot be null. |
setAdSelectionId
public ReportEventRequest.Builder setAdSelectionId (long adSelectionId)
Sets the ad selection ID with which the rendered ad's events are associated.
See ReportEventRequest.getAdSelectionId() for more information.
| Parameters | |
|---|---|
adSelectionId |
long |
| Returns | |
|---|---|
ReportEventRequest.Builder |
This value cannot be null. |
setData
public ReportEventRequest.Builder setData (String eventData)
Sets the ad event data.
See ReportEventRequest.getData() for more information.
| Parameters | |
|---|---|
eventData |
String: This value cannot be null. |
| Returns | |
|---|---|
ReportEventRequest.Builder |
This value cannot be null. |
setInputEvent
public ReportEventRequest.Builder setInputEvent (InputEvent inputEvent)
Sets the input event associated with the user interaction.
See ReportEventRequest.getInputEvent() for more information.
| Parameters | |
|---|---|
inputEvent |
InputEvent: This value may be null. |
| Returns | |
|---|---|
ReportEventRequest.Builder |
This value cannot be null. |
setKey
public ReportEventRequest.Builder setKey (String eventKey)
Sets the event key, the type of ad event to be reported.
See ReportEventRequest.getKey() for more information.
| Parameters | |
|---|---|
eventKey |
String: This value cannot be null. |
| Returns | |
|---|---|
ReportEventRequest.Builder |
This value cannot be null. |
setReportingDestinations
public ReportEventRequest.Builder setReportingDestinations (int reportingDestinations)
Sets the bitfield of reporting destinations to report to (buyer, seller, or both).
See ReportEventRequest.getReportingDestinations() for more information.
| Parameters | |
|---|---|
reportingDestinations |
int: Value is either 0 or a combination of the following:
|
| Returns | |
|---|---|
ReportEventRequest.Builder |
This value cannot be null. |