| Class Info |
|---|
| public abstract class NativeAd extends Object Native ad. |
| Qualifier and Type | Class Name and Description |
|---|---|
| static interface | NativeAd.NativeAdLoadedListener Listens for native ad loading successes. |
| Qualifier and Type | Method Name and Description |
|---|---|
| abstract void | destroy() Destroys an ad object. |
| abstract void | dislikeAd(DislikeAdReason reason) Dislikes the current ad as requested by a user. |
| abstract String | Obtains a flag indicating whether a task is an ad task. |
| abstract String | Obtains the ad source. |
| abstract String | Obtains the text to be displayed on an ad interaction button, for example, View details or Install. |
| abstract int | Obtains an ad creative type. |
| abstract String | Obtains the description of an ad. |
| abstract List<DislikeAdReason> | Obtains the "Dislike this ad" option. |
| Map<String, String> | getExt() Obtains ad extension information. |
| abstract Image | getIcon() Obtains the icon of an ad. |
| abstract List<Image> | Obtains multi-image assets of an ad. |
| abstract MediaContent | Obtains the multimedia content for an ad. |
| abstract String | getTitle() Obtains the title of an ad. |
| abstract String | Obtains the advertising ID. |
| abstract Video | getVideo() Obtains video assets of an ad. |
| abstract VideoOperator | Obtains the video controller of an ad. |
| abstract String | Obtains the redirection link to Why this ad. |
| abstract void | gotoWhyThisAdPage(Context context) Goes to the Why this ad page. |
| abstract boolean | Checks whether custom click gestures are enabled. |
| abstract boolean | isCustomDislikeThisAdEnabled() Checks whether custom ad disliking is enabled. |
| abstract void | onAdClose(Context context, List<String> keyWords) Called when an ad is closed. |
| abstract void | Reports a custom click event. |
| abstract boolean | recordClickEvent(Bundle data) Reports a custom click event. |
| abstract boolean | recordImpressionEvent(Bundle data) Reports an ad impression. |
| abstract boolean | recordShowStartEvent(Bundle data) Reports an event indicating that an ad starts to be shown. |
| abstract void | Enables custom click gestures. |
| abstract void | setDislikeAdListener(DislikeAdListener listener) Sets an ad disliking listener. |
| abstract void | triggerClick(Bundle data) Reports a click. |
| abstract boolean | Checks whether advertiser information is delivered for the current ad. |
| abstract List<AdvertiserInfo> | Obtains the advertiser information. |
| abstract void | showAppDetailPage(Context context) Shows the introduction page of the promoted app. |
| abstract boolean | Checks whether ad transparency information is displayed. |
| abstract String | Obtains the redirection URL of the ad transparency information. |
| abstract int | Obtains the ad purpose. |
| abstract void | setVideoConfiguration(VideoConfiguration videoConfiguration) Sets video playback parameters. For details, please refer to VideoConfiguration. |
| abstract BiddingInfo | 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. |
| 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) Dislikes the current ad as requested by a user. |
Parameters
| Name | Description |
|---|---|
| reason | Reason why a user dislikes an ad. |
| Method |
|---|
| public abstract String getAdSign() Obtains a flag indicating whether a task is an ad task. |
Returns
| Type | Description |
|---|---|
| String | Whether a task is an ad task.
The default value is 1. |
| Method |
|---|
| public abstract String getAdSource() Obtains the ad source. |
Returns
| Type | Description |
|---|---|
| String | Ad source. |
| Method |
|---|
| public abstract String getCallToAction() Obtains the text to be displayed on an ad interaction button, for example, View details or Install. |
Returns
| Type | Description |
|---|---|
| String | Text to be displayed on a button. |
| Method |
|---|
| public abstract int getCreativeType() Obtains an ad creative type. |
Returns
| Type | Description |
|---|---|
| int | Ad creative type.
|
| Method |
|---|
| public abstract String getDescription() Obtains the description of an ad. |
Returns
| Type | Description |
|---|---|
| String | Ad description. |
| Method |
|---|
| public abstract List<DislikeAdReason> getDislikeAdReasons() Obtains the "Dislike this ad" option. |
Returns
| Type | Description |
|---|---|
| List<DislikeAdReason> | "Dislike this ad" option. |
| Method |
|---|
| public Map<String, String> getExt() Obtains ad extension information. |
Returns
| Type | Description |
|---|---|
| Map<String, String> | Ad extension information. |
| Method |
|---|
| public abstract Image getIcon() Obtains the icon of an ad. |
Returns
| Type | Description |
|---|---|
| Icon of an ad. |
| Method |
|---|
| public abstract List<Image> getImages() Obtains multi-image assets of an ad. |
Returns
| Type | Description |
|---|---|
| List<Image> | Multi-image assets of an ad. |
| Method |
|---|
| public abstract MediaContent getMediaContent() Obtains the multimedia content for an ad. |
Returns
| Type | Description |
|---|---|
| Multimedia content for an ad. |
| Method |
|---|
| public abstract String getTitle() Obtains the title of an ad. |
Returns
| Type | Description |
|---|---|
| String | Ad title. |
| Method |
|---|
| public abstract String getUniqueId() Obtains the advertising ID. |
Returns
| Type | Description |
|---|---|
| String | Advertising ID. |
| Method |
|---|
| public abstract Video getVideo() Obtains video assets of an ad. |
Returns
| Type | Description |
|---|---|
| Video assets of an ad. |
| Method |
|---|
| public abstract VideoOperator getVideoOperator() Obtains the video controller of an ad. |
Returns
| Type | Description |
|---|---|
| Video controller of an ad. |
| Method |
|---|
| public abstract String getWhyThisAd() Obtains the redirection link to Why this ad. |
Returns
| Type | Description |
|---|---|
| String | Redirection link to Why this ad. |
| Method |
|---|
| public abstract void gotoWhyThisAdPage(Context context) Opens the page indicating why this ad or the ad transparency information is displayed. |
Parameters
| Name | Description |
|---|---|
| context | Context. |
| Method |
|---|
| public abstract boolean isCustomClickAllowed() Checks whether custom click gestures are enabled. |
Returns
| Type | Description |
|---|---|
| boolean | Whether custom click gestures are enabled.
The default value is false. |
| Method |
|---|
| public abstract boolean isCustomDislikeThisAdEnabled() Checks whether custom ad disliking is enabled. |
Returns
| Type | Description |
|---|---|
| boolean | Whether custom ad disliking is enabled.
The default value is false. |
| Method |
|---|
| public abstract void onAdClose(Context context, List<String> keyWords) Called when an ad is closed. |
Parameters
| Name | Description |
|---|---|
| context | Context. |
| keyWords | Ad keyword. |
| Method |
|---|
| public abstract boolean recordClickEvent(Bundle data) Reports a custom click event. |
Parameters
| Name | Description |
|---|---|
| data | Click event data. You can pass clickX, clickY, and creativeSize to data, which helps traffic monetization.
|
Returns
| Type | Description |
|---|---|
| boolean | Whether a custom click event is reported successfully.
The default value is false. |
| Method |
|---|
| public abstract boolean recordImpressionEvent(Bundle data) Reports an ad impression. |
Parameters
| Name | Description |
|---|---|
| data | Impression data. |
Returns
| Type | Description |
|---|---|
| boolean | Whether an ad impression is reported successfully.
|
| Method |
|---|
| public abstract boolean recordShowStartEvent(Bundle data) Reports an event indicating that an ad starts to be shown. |
Parameters
| Name | Description |
|---|---|
| data | Data carried in the reported event. |
Returns
| Type | Description |
|---|---|
| boolean | Whether an event indicating that an ad starts to be shown is reported successfully.
|
| Method |
|---|
| public abstract void setAllowCustomClick() Enables custom click gestures. |
| Method |
|---|
| public abstract void setDislikeAdListener(DislikeAdListener listener) Sets an ad disliking listener. |
Parameters
| Name | Description |
|---|---|
| listener | Ad disliking listener. |
| Method |
|---|
| public abstract void triggerClick(Bundle data) Manually triggers a click. |
Parameters
| Name | Description |
|---|---|
| data | Click data. You can pass clickX, clickY, and creativeSize to data, which helps traffic monetization.
|
| 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). |
| Method |
|---|
| public abstract List getAdvertiserInfo() Obtains the advertiser information. |
Returns
| Type | Description |
|---|---|
| List<AdvertiserInfo> | Advertiser information list. |
| Method |
|---|
| public abstract void showAppDetailPage(Context context) Shows the introduction page of the promoted app. |
Parameters
| Name | Description |
|---|---|
| context | Context. |
| Method |
|---|
| public abstract boolean isTransparencyOpen() Checks whether ad transparency information is displayed. |
Parameters
| Name | Description |
|---|---|
| boolean | Indicates whether ad transparency information is displayed. |
| 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. |
| Method |
|---|
| public abstract int getInterActionType() Obtains the ad purpose. |
Returns
| Type | Description |
|---|---|
| int | Ad purpose. The options are as follows: 0: for display only (No action is taken after the ad is tapped.) 1: web promotion (A web page is opened when the ad is tapped.) 2: app download (An app is downloaded when the ad is tapped.) 3: app or quick app engagement (The app or quick app is opened when the ad is tapped.) 5: app promotion (When the ad is tapped, the app is downloaded if it is not installed and opened if it is installed.) 7: e-commerce web page (When the ad is tapped, the app is downloaded if it is installed and a web page is opened if the app is not installed.) 8: scheduled download 9: HarmonyOS service 10: mini program startup |
| Method |
|---|
| Public abstract void setVideoConfiguration(VideoConfiguration videoConfiguration) Sets video playback parameters. |
Returns
| Type | Description |
|---|---|
| videoConfiguration | Video configuration that controls video playback. |
| Method |
|---|
| public abstract BiddingInfo getBiddingInfo() Obtains the real-time bidding data returned to the app. |
Returns
| Type | Description |
|---|---|
| Real-time bidding information returned by the ADX. |
| 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 that needs to be replaced in the URL 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. |
| Called when the bidding result is reported. |
| 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 that needs to be replaced in the URL 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. |
| Called when the bidding result is reported. |