目录

CLASS info
public abstract class NativeAd extends Object
Native ad.

Nested Class Summary

TypeNameDesc
@interfaceNativeAd.NativeAdLoadedListenerNative ad loading success listener.

Public Constructor Summary

Constructor name
NativeAd()
Native ad constructor.

Public Mehtod Summary

ReturnMethod
abstract voiddestroy()
Destroys an ad object.
abstract voiddislikeAd(DislikeAdReason reason)
Does not display the current ad. After this method is called, the current ad is closed.
abstract voidsetAllowCustomClick()
Enables custom tap gestures.
abstract StringgetAdSource()
Obtains an ad source.
abstract StringgetDescription()
Obtains the description of an ad.
abstract StringgetCallToAction()
Obtains the text to be displayed on a button, for example, View Details or Install.
abstract List<DislikeAdReason>getDislikeAdReasons()
Obtains the choice of not displaying the current ad.
abstract StringgetTitle()
Obtains the title of an ad.
abstract ImagegetIcon()
Obtains the icon of an ad.
abstract List<Image>getImages()
Obtains multi-image materials of an ad.
abstract VideoOperatorgetVideoOperator()
Obtains the video controller of an ad.
abstract booleanisCustomClickAllowed()
Checks whether custom tap gestures are enabled.
abstract booleanisCustomDislikeThisAdEnabled()
Checks whether custom ad closing is enabled.
abstract voidtriggerClick(Bundle data)
Reports a tap.
abstract voidrecordClickEvent()
Reports a custom tap gesture.
abstract voidrecordImpressionEvent(Bundle data)
Reports an ad impression.
abstract voidsetDislikeAdListener(DislikeAdListener listener)
Sets an ad closing listener.

Public Constructors

Constructor
public NativeAd()
Native ad constructor.

Public Methods

Method
public abstract void destroy()
Destroys an ad object. After calling destroy(), do not call any other methods on the ad object.
Method
public abstract void dislikeAd(DislikeAdReason reason)
Does not display the current ad. After this method is called, the current ad is closed.

Parameters

Parameter nameParameter desc
reasonReason why a user chooses not to display the current ad.
Method
public abstract void setAllowCustomClick()
Enables custom tap gestures.
Method
public abstract String getAdSource()
Obtains an ad source.

Return

typedesc
StringAd source.
Method
public abstract String getDescription()
Obtains the description of an ad.

Return

typedesc
StringAd description.
Method
public abstract String getCallToAction()
Obtains the text to be displayed on a button, for example, View Details or Install.

Return

typedesc
StringText to be displayed on a button.
Method
public abstract List<DislikeAdReason> getDislikeAdReasons()
Obtains the choice of not displaying the current ad.

Return

typedesc
List<DislikeAdReason>Choice of not displaying the current ad.
Method
public abstract String getTitle()
Obtains the title of an ad.

Return

typedesc
StringTitle of an ad.
Method
public abstract Image getIcon()
Obtains the icon of an ad.

Return

typedesc
ImageIcon of an ad.
Method
public abstract List<Image> getImages()
Obtains multi-image materials of an ad.

Return

typedesc
List<Image>Multi-image materials of an ad.
Method
public abstract VideoOperator getVideoOperator()
Obtains the video controller of an ad.

Return

typedesc
VideoOperatorVideo controller of an ad.
Method
public abstract boolean isCustomClickAllowed()
Checks whether custom tap gestures are enabled.

Return

typedesc
booleanWhether custom tap gestures are enabled.
Method
public abstract boolean isCustomDislikeThisAdEnabled()
Checks whether custom ad closing is enabled.

Return

typedesc
booleanWhether custom ad closing is enabled.
Method
public abstract void triggerClick(Bundle data)
Reports a tap.

Parameters

Parameter nameParameter desc
dataTap data.
Method
public abstract void recordClickEvent()
Reports a custom tap gesture.
Method
public abstract boolean recordImpressionEvent(Bundle data)
Reports an ad impression.

Parameters

Parameter nameParameter desc
dataImpression data.


Return

typedesc
booleanIf an impression is recorded for an ad successfully, true is returned. Otherwise, false is returned.
Method
public abstract void setDislikeAdListener(DislikeAdListener listener)
Sets an ad closing listener.

Parameters

Parameter nameParameter desc
listenerAd closing listener.