AdManagerAdRequest

public final class AdManagerAdRequest extends AdRequest


AdManagerAdRequest 包含用于从 Google Ad Manager 获取广告的定位信息。广告请求是使用 AdManagerAdRequest.Builder 创建的。

摘要

嵌套类型

构建 AdManagerAdRequest

公共方法

Bundle

返回自定义定位参数。

String

返回用于跨设备实现频次上限、受众群细分和定位、依序广告轮播以及基于受众群体的其他广告投放控制功能的标识符。

继承的常量

来自 com.google.android.gms.ads.AdRequest
static final String
DEVICE_ID_EMULATOR = "B3EEABB8EE11C2BE770B684D95219ECB"

用于搭配 setTestDeviceIds 使用的模拟器的 deviceId

static final int

由于缺少应用 ID,因此未发出广告请求。

static final int

内部出现问题;例如,收到广告服务器的无效响应。

static final int

广告字符串无效。

static final int

广告请求无效;例如,广告单元 ID 不正确。

static final int

中介适配器未填充广告请求。

static final int

由于网络连接问题,广告请求失败。

static final int

广告请求成功,但由于缺少广告资源,未返回广告。

static final int

找不到广告字符串中的请求 ID。

static final int

内容网址长度上限。

继承的方法

来自 com.google.android.gms.ads.AdRequest
@Nullable String

获取广告字符串。

String

返回内容网址定位信息。

@Nullable Bundle
<T extends CustomEvent> getCustomEventExtrasBundle(Class<T> adapterClass)

此方法已弃用。

请改用 getNetworkExtrasBundle

Set<String>

返回定位信息关键字。

List<String>

返回邻近内容网址的列表;如果未设置任何网址,则返回空列表。

@Nullable Bundle
<T extends MediationExtrasReceiver> getNetworkExtrasBundle(
    Class<T> adapterClass
)

返回要传递给特定广告联盟适配器的额外参数。

long

获取此 AdRequest 中设置的展示位置 ID

String

返回用于标识广告请求来源的请求代理字符串。

boolean

如果相应设备将接收测试广告,则返回 true

公共方法

getCustomTargeting

public Bundle getCustomTargeting()

返回自定义定位参数。

getPublisherProvidedId

public String getPublisherProvidedId()

返回用于跨设备实现频次上限、受众群细分和定位、依序广告轮播以及基于受众群体的其他广告投放控制功能的标识符。