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)

Ctor for auction server ad selection reporting request.

ReportImpressionRequest(long adSelectionId, AdSelectionConfig adSelectionConfig)

Ctor for on-device 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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

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

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.

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