API 级别 34 中添加
也在广告服务扩展 4 中添加

ReportImpressionRequest

public class ReportImpressionRequest
extends Object

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


表示报告展示次数 API 的输入参数。

总结

公共构造函数

ReportImpressionRequest(long adSelectionId, AdSelectionConfig adSelectionConfig)

用于设备端广告选择报告请求的过滤条件。

ReportImpressionRequest(long adSelectionId)

竞价服务器广告选择报告请求的过滤条件。

公共方法

AdSelectionConfig getAdSelectionConfig()

返回 adSelectionConfig(ReportImpressionRequest 的一项输入)

long getAdSelectionId()

返回 adSelectionId(ReportImpressionRequest 的一项输入)

继承的方法

公共构造函数

ReportImpressionRequest

API 级别 34 中添加
也在广告服务扩展 4 中添加
public ReportImpressionRequest (long adSelectionId, 
                AdSelectionConfig adSelectionConfig)

用于设备端广告选择报告请求的过滤条件。

如果您的 adSelectionId 是用于使用 AdSelectionManager.selectAds(android.adservices.adselection.AdSelectionConfig, java.util.concurrent.Executor, android.os.OutcomeReceiver) 运行的设备端竞价,则展示次数报告请求必须包含 AdSelectionConfig

参数
adSelectionId long:收到来自AdSelectionManager#selectAds(AdSelectionConfig, Executor, OutcomeReceiver)

adSelectionConfig AdSelectionConfig:用于触发 AdSelectionManager.selectAds(android.adservices.adselection.AdSelectionConfig, java.util.concurrent.Executor, android.os.OutcomeReceiver) 的相同 AdSelectionConfig。此值不能为 null

ReportImpressionRequest

public ReportImpressionRequest (long adSelectionId)

竞价服务器广告选择报告请求的过滤条件。

如果您的 adSelectionId 用于服务器竞价运行且由 AdSelectionManager#getAdSelectionData 收集设备信息,那么您的展示次数报告请求应仅包含广告选择 ID。

在发出展示次数报告请求之前,必须使用来自服务器的加密结果 blob 调用 AdSelectionManager#persistAdSelectionResult

参数
adSelectionId long:收到来自AdSelectionManager#getAdSelectionData

公共方法

getAdSelectionConfig

API 级别 34 中添加
也在广告服务扩展 4 中添加
public AdSelectionConfig getAdSelectionConfig ()

返回 adSelectionConfig(ReportImpressionRequest 的一项输入)

开球回攻次数
AdSelectionConfig 此值不能为 null

getAdSelectionId

API 级别 34 中添加
也在广告服务扩展 4 中添加
public long getAdSelectionId ()

返回 adSelectionId(ReportImpressionRequest 的一项输入)

开球回攻次数
long