ReportEventRequest
public
class
ReportEventRequest
extends Object
java.lang.Object | |
↳ | android.adservices.adselection.ReportEventRequest |
Request object wrapping the required arguments needed to report an ad event.
Summary
Nested classes | |
---|---|
class |
ReportEventRequest.Builder
Builder for |
Constants | |
---|---|
int |
FLAG_REPORTING_DESTINATION_BUYER
This is used to represent buyer as the destination for report event API. |
int |
FLAG_REPORTING_DESTINATION_COMPONENT_SELLER
This is used to component seller as the destination for report event API |
int |
FLAG_REPORTING_DESTINATION_SELLER
This is used to represent seller as the destination for report event API |
Public methods | |
---|---|
long
|
getAdSelectionId()
Returns the adSelectionId, the primary identifier of an ad selection process. |
String
|
getData()
Returns the ad event data. |
InputEvent
|
getInputEvent()
Returns the input event associated with the user interaction. |
String
|
getKey()
Returns the event key, the type of ad event to be reported. |
int
|
getReportingDestinations()
Returns the bitfield of reporting destinations to report to (buyer, seller, component seller or any of the combination of them). |
Inherited methods | |
---|---|
Constants
FLAG_REPORTING_DESTINATION_BUYER
public static final int FLAG_REPORTING_DESTINATION_BUYER
This is used to represent buyer as the destination for report event API.
Constant Value: 2 (0x00000002)
FLAG_REPORTING_DESTINATION_COMPONENT_SELLER
public static final int FLAG_REPORTING_DESTINATION_COMPONENT_SELLER
This is used to component seller as the destination for report event API
Constant Value: 4 (0x00000004)
FLAG_REPORTING_DESTINATION_SELLER
public static final int FLAG_REPORTING_DESTINATION_SELLER
This is used to represent seller as the destination for report event API
Constant Value: 1 (0x00000001)
Public methods
getAdSelectionId
public long getAdSelectionId ()
Returns the adSelectionId, the primary identifier of an ad selection process.
Returns | |
---|---|
long |
getData
public String getData ()
Returns the ad event data.
After ad selection, this data is generated by the caller. The caller can then call AdSelectionManager.reportEvent(ReportEventRequest, Executor, OutcomeReceiver)
. This data will be attached in a POST request to the reportingUri
registered in registerAdBeacon
.
The size of String.getBytes()
in UTF-8
format should be below 64KB.
Returns | |
---|---|
String |
This value cannot be null . |
getInputEvent
public InputEvent getInputEvent ()
Returns the input event associated with the user interaction.
This field is either null
, representing a view event, or has an InputEvent
object, representing a click event.
Returns | |
---|---|
InputEvent |
getKey
public String getKey ()
Returns the event key, the type of ad event to be reported.
This field will be used to fetch the reportingUri
associated with the eventKey
registered in registerAdBeacon
after ad selection.
This field should be an exact match to the eventKey
registered in registerAdBeacon
. Specific details about registerAdBeacon
can be found at the
documentation of AdSelectionManager.reportImpression
The event key (when inspecting its byte array with String.getBytes()
) in UTF-8
format should not exceed 40 bytes. Any key exceeding this limit will not be registered
during the registerAdBeacon
call.
Returns | |
---|---|
String |
This value cannot be null . |
getReportingDestinations
public int getReportingDestinations ()
Returns the bitfield of reporting destinations to report to (buyer, seller, component seller or any of the combination of them).
To create this bitfield, place an |
bitwise operator between each reportingDestination
to be reported to. For example to only report to buyer, set the
reportingDestinations field to FLAG_REPORTING_DESTINATION_BUYER
To only report to
seller, set the reportingDestinations field to FLAG_REPORTING_DESTINATION_SELLER
To
report to buyers and sellers, set the reportingDestinations field to FLAG_REPORTING_DESTINATION_BUYER
| FLAG_REPORTING_DESTINATION_SELLER
. To report to
buyer, seller and component seller, set the reportingDestinations field to FLAG_REPORTING_DESTINATION_BUYER
| FLAG_REPORTING_DESTINATION_SELLER
| FLAG_REPORTING_DESTINATION_COMPONENT_SELLER
.
Returns | |
---|---|
int |
Value is either 0 or a combination of FLAG_REPORTING_DESTINATION_SELLER , FLAG_REPORTING_DESTINATION_BUYER , and FLAG_REPORTING_DESTINATION_COMPONENT_SELLER |
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-06-10 UTC.
TMZ Celebrity News – Breaking Stories, Videos & Gossip
Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.
Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.
🎥 Watch TMZ Live
TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.
- Exclusive TMZ interviews and court updates
- Viral celebrity videos and candid photos
- Trending gossip and entertainment news