ReportInteractionRequest
public
class
ReportInteractionRequest
extends Object
java.lang.Object | |
↳ | android.adservices.adselection.ReportInteractionRequest |
Request object wrapping the required arguments needed to report an interaction.
Summary
Constants | |
---|---|
int |
FLAG_REPORTING_DESTINATION_BUYER
|
int |
FLAG_REPORTING_DESTINATION_SELLER
|
Public constructors | |
---|---|
ReportInteractionRequest(long adSelectionId, String interactionKey, String interactionData, int reportingDestinations)
|
Public methods | |
---|---|
long
|
getAdSelectionId()
Returns the adSelectionId, the primary identifier of an ad selection process. |
String
|
getInteractionData()
Returns the interaction data. |
String
|
getInteractionKey()
Returns the interaction key, the type of interaction to be reported. |
int
|
getReportingDestinations()
Returns the bitfield of reporting destinations to report to (buyer, seller, or both). |
Inherited methods | |
---|---|
Constants
FLAG_REPORTING_DESTINATION_BUYER
public static final int FLAG_REPORTING_DESTINATION_BUYER
Constant Value: 2 (0x00000002)
FLAG_REPORTING_DESTINATION_SELLER
public static final int FLAG_REPORTING_DESTINATION_SELLER
Constant Value: 1 (0x00000001)
Public constructors
ReportInteractionRequest
public ReportInteractionRequest (long adSelectionId, String interactionKey, String interactionData, int reportingDestinations)
Parameters | |
---|---|
adSelectionId |
long |
interactionKey |
String : This value cannot be null . |
interactionData |
String : This value cannot be null . |
reportingDestinations |
int : Value is either 0 or a combination of FLAG_REPORTING_DESTINATION_SELLER , and FLAG_REPORTING_DESTINATION_BUYER |
Public methods
getAdSelectionId
public long getAdSelectionId ()
Returns the adSelectionId, the primary identifier of an ad selection process.
Returns | |
---|---|
long |
getInteractionData
public String getInteractionData ()
Returns the interaction data.
After ad selection, this data is generated by the caller, and will be attached in a POST
request to the interactionReportingUri
registered in registerAdBeacon
.
Returns | |
---|---|
String |
This value cannot be null . |
getInteractionKey
public String getInteractionKey ()
Returns the interaction key, the type of interaction to be reported.
This will be used to fetch the interactionReportingUri
associated with the interactionKey
registered in registerAdBeacon
after ad selection.
Returns | |
---|---|
String |
This value cannot be null . |
getReportingDestinations
public int getReportingDestinations ()
Returns the bitfield of reporting destinations to report to (buyer, seller, or both).
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 both buyers and sellers, set the reportingDestinations field to FLAG_REPORTING_DESTINATION_BUYER
| FLAG_REPORTING_DESTINATION_SELLER
Returns | |
---|---|
int |
Value is either 0 or a combination of FLAG_REPORTING_DESTINATION_SELLER , and FLAG_REPORTING_DESTINATION_BUYER |