ReportImpressionRequest

public class ReportImpressionRequest
extends Object

java.lang.Object
   ↳ android.adservices.adselection.ReportImpressionRequest


Represent input parameters to the reportImpression API.

Summary

Public constructors

ReportImpressionRequest(long adSelectionId, AdSelectionConfig adSelectionConfig)

Ctor for on-device ad selection reporting request.

ReportImpressionRequest(long adSelectionId)

Ctor for auction server ad selection reporting request.

Public methods

AdSelectionConfig getAdSelectionConfig()

Returns the adSelectionConfig, one of the inputs to ReportImpressionRequest

long getAdSelectionId()

Returns the adSelectionId, one of the inputs to ReportImpressionRequest

Inherited methods

Public constructors

ReportImpressionRequest

public ReportImpressionRequest (long adSelectionId, 
                AdSelectionConfig adSelectionConfig)

Ctor for on-device ad selection reporting request.

If your adSelectionId is for a on-device auction run using AdSelectionManager.selectAds(android.adservices.adselection.AdSelectionConfig, java.util.concurrent.Executor, android.os.OutcomeReceiver) then your impression reporting request must include your AdSelectionConfig.

Parameters
adSelectionId long: received from AdSelectionManager#selectAds(AdSelectionConfig, Executor, OutcomeReceiver)

adSelectionConfig AdSelectionConfig: same AdSelectionConfig used to trigger AdSelectionManager.selectAds(android.adservices.adselection.AdSelectionConfig, java.util.concurrent.Executor, android.os.OutcomeReceiver) This value cannot be null.

ReportImpressionRequest

public ReportImpressionRequest (long adSelectionId)

Ctor for auction server ad selection reporting request.

If your adSelectionId is for a server auction run where device info collected by AdSelectionManager#getAdSelectionData then your impression reporting request should only include the ad selection id.

AdSelectionManager#persistAdSelectionResult must be called with the encrypted result blob from servers before making impression reporting request.

Parameters
adSelectionId long: received from AdSelectionManager#getAdSelectionData

Public methods

getAdSelectionConfig

public AdSelectionConfig getAdSelectionConfig ()

Returns the adSelectionConfig, one of the inputs to ReportImpressionRequest

Returns
AdSelectionConfig This value cannot be null.

getAdSelectionId

public long getAdSelectionId ()

Returns the adSelectionId, one of the inputs to ReportImpressionRequest

Returns
long