ReportImpressionRequest


public class ReportImpressionRequest
extends Object

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


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/

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

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(AdSelectionConfig,Executor,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(AdSelectionConfig,Executor,OutcomeReceiver)
This value cannot be null.

Public methods

getAdSelectionConfig

Added in API level 34
Also in Ad Services Extensions 4
Deprecated in API level 37
public AdSelectionConfig getAdSelectionConfig ()

Returns the adSelectionConfig, one of the inputs to ReportImpressionRequest

Returns
AdSelectionConfig This value cannot be null.

getAdSelectionId

Added in API level 34
Also in Ad Services Extensions 4
Deprecated in API level 37
public long getAdSelectionId ()

Returns the adSelectionId, one of the inputs to ReportImpressionRequest

Returns
long