ReportImpressionRequest
open class ReportImpressionRequest
| kotlin.Any | |
| ↳ | android.adservices.adselection.ReportImpressionRequest |
Represent input parameters to the reportImpression API.
Summary
| Public constructors | |
|---|---|
ReportImpressionRequest(adSelectionId: Long)Ctor for auction server ad selection reporting request. |
|
ReportImpressionRequest(adSelectionId: Long, adSelectionConfig: AdSelectionConfig)Ctor for on-device ad selection reporting request. |
|
| Public methods | |
|---|---|
| open AdSelectionConfig |
Returns the adSelectionConfig, one of the inputs to |
| open Long |
Returns the adSelectionId, one of the inputs to |
Public constructors
ReportImpressionRequest
ReportImpressionRequest(adSelectionId: Long)
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
ReportImpressionRequest(
adSelectionId: Long,
adSelectionConfig: AdSelectionConfig)
Ctor for on-device ad selection reporting request.
If your adSelectionId is for a on-device auction run using android.adservices.adselection.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, |
adSelectionConfig |
AdSelectionConfig: same AdSelectionConfig used to trigger android.adservices.adselection.AdSelectionManager#selectAds(android.adservices.adselection.AdSelectionConfig,java.util.concurrent.Executor,android.os.OutcomeReceiver) This value cannot be null. |
Public methods
getAdSelectionConfig
open fun getAdSelectionConfig(): AdSelectionConfig
Returns the adSelectionConfig, one of the inputs to ReportImpressionRequest
| Return | |
|---|---|
AdSelectionConfig |
This value cannot be null. |
getAdSelectionId
open fun getAdSelectionId(): Long
Returns the adSelectionId, one of the inputs to ReportImpressionRequest