目录

InstreamAd

Class Info

public abstract class InstreamAd

Roll ad.

Public Method Summary

Qualifier and Type

Class Name and Description

abstract String

getAdSign()

Obtains a flag indicating whether a task is an ad task.

abstract String

getAdSource()

Obtains the ad source.

abstract String

getCallToAction()

Obtains the text to be displayed on a button.

abstract long

getDuration()

Obtains the duration of a roll ad.

abstract String

getWhyThisAd()

Obtains the redirection link to Why this ad.

abstract boolean

isClicked()

Checks whether an ad has been clicked.

abstract boolean

isExpired()

Checks whether an ad has expired.

abstract boolean

isImageAd()

Checks whether the ad is an image ad.

abstract boolean

isShown()

Checks whether an ad has been displayed.

abstract boolean

isVideoAd()

Checks whether the ad is a video ad.

abstract boolean

hasAdvertiserInfo()

Checks whether advertiser information is delivered for the current ad.

abstract List<AdvertiserInfo>

getAdvertiserInfo()

Obtains the advertiser information.

abstract boolean

isTransparencyOpen()

Checks whether ad transparency information is displayed.

abstract String

getTransparencyTplUrl()

Obtains the redirection URL of the ad transparency information.

abstract BiddingInfo

getBiddingInfo()

Obtains the real-time bidding data returned to the app.

void

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

Reports the bidding success result.

void

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

Reports the bidding failure result.

Public Methods

[h2]getAdSign

Method

public abstract String getAdSign()

Obtains a flag indicating whether a task is an ad task.

Returns

Type

Description

String

Indicates whether a task is an ad task.

  • 0: no
  • 1: yes

The default value is 1.

[h2]getAdSource

Method

public abstract String getAdSource()

Obtains the ad source.

Returns

Type

Description

String

Ad source.

[h2]getCallToAction

Method

public abstract String getCallToAction()

Obtains the text to be displayed on a button.

Returns

Type

Description

String

Text to be displayed on a button.

[h2]getDuration

Method

public abstract long getDuration()

Obtains the duration of a roll ad.

Returns

Type

Description

long

Duration of a roll ad, in milliseconds.

[h2]getWhyThisAd

Method

public abstract String getWhyThisAd()

Obtains the redirection link to Why this ad.

Returns

Type

Description

String

Redirection link to Why this ad.

[h2]isClicked

Method

public abstract boolean isClicked()

Checks whether an ad has been clicked.

Returns

Type

Description

boolean

Whether an ad has been clicked.

  • true: yes
  • false: no

[h2]isExpired

Method

public abstract boolean isExpired()

Checks whether an ad has expired.

Returns

Type

Description

boolean

Whether an ad has expired.

  • true: yes
  • false: no

[h2]isImageAd

Method

public abstract boolean isImageAd()

Checks whether the ad is an image ad.

Returns

Type

Description

boolean

Whether the ad is an image ad.

  • true: yes
  • false: no

[h2]isShown

Method

public abstract boolean isShown()

Checks whether an ad has been displayed.

Returns

Type

Description

boolean

Whether an ad has been displayed.

  • true: yes
  • false: no

[h2]isVideoAd

Method

public abstract boolean isVideoAd()

Checks whether the ad is a video ad.

Returns

Type

Description

boolean

Whether the ad is a video ad.

  • true: yes
  • false: no

[h2]hasAdvertiserInfo

Method

public abstract boolean hasAdvertiserInfo()

Checks whether advertiser information is delivered for the current ad.

Returns

Type

Description

boolean

Whether to deliver advertiser information. The options are true (yes) and false (no).

[h2]getAdvertiserInfo

Method

public abstract List getAdvertiserInfo()

Obtains the advertiser information.

Returns

Type

Description

List<AdvertiserInfo>

Advertiser information list.

[h2]isTransparencyOpen

Method

public abstract boolean isTransparencyOpen()

Checks whether ad transparency information is displayed.

Parameters

Name

Description

boolean

Indicates whether ad transparency information is displayed.

[h2]getTransparencyTplUrl

Method

public abstract String getTransparencyTplUrl()

Obtains the redirection URL of the ad transparency information.

Parameters

Name

Description

String

Redirection URL of the ad transparency information.

[h2]getBiddingInfo

Method

public abstract BiddingInfo getBiddingInfo()

Obtains the real-time bidding data returned to the app.

Returns

Type

Description

BiddingInfo

Real-time bidding information returned by the ADX.

[h2]sendBiddingSuccess

Method

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

Reports the bidding success result.

Parameters

Name

Description

sendSuccessInfo

Macro replacement parameters when a bid is successful; of the Map type.

The key represents the macro in the URL that needs to be replaced and is of the String type, while the value represents the corresponding replacement information and is of the Object type.

For details about macro replacement, please refer to Real-Time Bidding.

ReportUrlListener

Called when the bidding result is reported.

[h2]sendBiddingFailed

Method

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

Reports the bidding failure result.

Parameters

Name

Description

sendFailInfo

Macro replacement parameters for a failed bid; of the Map type.

The key represents the macro in the URL that needs to be replaced and is of the String type, while the value represents the corresponding replacement information and is of the Object type.

For details about macro replacement, please refer to Real-Time Bidding.

ReportUrlListener

Called when the bidding result is reported.