文档管理中心
我的
API参考广告服务Android-Javacom.huawei.hms.ads.instreamadClass SummaryInstreamAd

InstreamAd

展开

Class Info

public abstract class InstreamAd

贴片广告。

Public Method Summary

展开

Qualifier and Type

Class Name and Description

abstract String

getAdSign()

标识本任务是否是广告。

abstract String

getAdSource()

获取广告来源。

abstract String

getCallToAction()

获取按钮显示的动作说明。

abstract long

getDuration()

获取贴片广告展示时长。

abstract String

getWhyThisAd()

获取为什么显示此广告跳转链接。

abstract boolean

isClicked()

广告是否被点击过。

abstract boolean

isExpired()

广告是否过期。

abstract boolean

isImageAd()

广告是否是图片广告。

abstract boolean

isShown()

广告是否展示过。

abstract boolean

isVideoAd()

广告是否是视频广告。

abstract String

getDspName()

获取广告dsp名称。

abstract String

getDspLogo()

获取广告dspLogo的url。

abstract boolean

hasAdvertiserInfo()

当前广告是否下发广告主信息。

abstract List<AdvertiserInfo>

getAdvertiserInfo()

获取广告主信息列表。

abstract boolean

isTransparencyOpen()

是否需要展示广告透明性信息 。

abstract String

getTransparencyTplUrl()

获取广告透明性信息跳转链接。

abstract BiddingInfo

getBiddingInfo()

获取返回给媒体实时bidding相关数据。

void

sendBiddingSuccess(Map<String, Object> sendSuccessInfo, ReportUrlListener reportUrlListener)

上报Bidding竞价成功接口。

void

sendBiddingFailed(Map<String, Object> sendFailInfo, ReportUrlListener reportUrlListener)

上报Bidding竞价失败接口。

Public Methods

getAdSign

展开

Method

public abstract String getAdSign()

标识本任务是否为广告。

Returns

展开

Type

Description

String

本任务的标识:

  • 0:非广告
  • 1:广告

默认值为1。

getAdSource

展开

Method

public abstract String getAdSource()

获取广告来源。

Returns

展开

Type

Description

String

广告来源。

getCallToAction

展开

Method

public abstract String getCallToAction()

获取按钮显示的动作说明。

Returns

展开

Type

Description

String

点击跳转动作说明。

getDuration

展开

Method

public abstract long getDuration()

获取贴片广告展示时长。

Returns

展开

Type

Description

long

贴片展示时长,单位:毫秒。

getWhyThisAd

展开

Method

public abstract String getWhyThisAd()

获取“为什么显示此广告”跳转链接。

Returns

展开

Type

Description

String

“为什么显示此广告”跳转链接。

isClicked

展开

Method

public abstract boolean isClicked()

广告是否被点击过。

Returns

展开

Type

Description

boolean

广告是否被点击过:

  • true:广告已被点击过。
  • false:广告未被点击过。

isExpired

展开

Method

public abstract boolean isExpired()

广告是否过期。

Returns

展开

Type

Description

boolean

广告是否过期:

  • true:广告已过期。
  • false:广告未过期。

isImageAd

展开

Method

public abstract boolean isImageAd()

广告是否是图片广告。

Returns

展开

Type

Description

boolean

广告是否是图片广告:

  • true:是。
  • false:否。

isShown

展开

Method

public abstract boolean isShown()

广告是否展示过。

Returns

展开

Type

Description

boolean

广告是否展示过:

  • true:广告展示过。
  • false:广告未展示过。

isVideoAd

展开

Method

public abstract boolean isVideoAd()

广告是否是视频广告。

Returns

展开

Type

Description

boolean

广告是否是视频广告:

  • true:是。
  • false:否。

getDspName

展开

Method

public abstract String getDspName()

获取广告dsp名称。

Returns

展开

Type

Description

String

广告dsp名称。

getDspLogo

展开

Method

public abstract String getDspLogo()

获取广告dspLogo的url。

Returns

展开

Type

Description

String

广告dspLogo的url。

hasAdvertiserInfo

展开

Method

public abstract boolean hasAdvertiserInfo()

当前广告是否下发广告主信息。

Returns

展开

Type

Description

boolean

是否下发广告主信息,true:下发;false:未下发。

getAdvertiserInfo

展开

Method

public abstract List getAdvertiserInfo()

获取广告主信息。

Returns

展开

Type

Description

List<AdvertiserInfo>

广告主信息列表。

isTransparencyOpen

展开

Method

public abstract boolean isTransparencyOpen()

是否需要展示广告透明性信息。

Parameters

展开

Name

Description

boolean

是否需要展示广告透明性信息。

getTransparencyTplUrl

展开

Method

public abstract String getTransparencyTplUrl()

获取广告透明性信息跳转链接。

Parameters

展开

Name

Description

String

广告透明性信息跳转链接。

getBiddingInfo

展开

Method

public abstract BiddingInfo getBiddingInfo()

获取返回给媒体实时bidding相关数据。

Returns

展开

Type

Description

BiddingInfo

BiddingInfo实时bidding ADX返回的参数。

sendBiddingSuccess

展开

Method

public void sendBiddingSuccess(Map<String, Object> sendSuccessInfo, ReportUrlListener reportUrlListener)

Bidding竞价成功调用该函数,上报竞价成功。

Parameters

展开

Name

Description

sendSuccessInfo

竞价成功的宏替换参数,是Map类型。

key是URL中需要替换的宏,宏是String类型,value是对应替换的信息,是Object类型。

相关宏替换参考:实时竞价广告。

ReportUrlListener

竞价结果上报回调。

sendBiddingFailed

展开

Method

public void sendBiddingFailed(Map<String, Object> sendFailInfo, ReportUrlListener reportUrlListener)

Bidding竞价失败调用该函数,上报竞价失败。

Parameters

展开

Name

Description

sendFailInfo

竞价失败的宏替换参数,是Map类型。

key是URL中需要替换的宏,宏是String类型,value是对应替换的信息,是Object类型。

相关宏替换参考:实时竞价广告。

ReportUrlListener

竞价结果上报回调。