Menu

advanced settings

1. Advanced Settings API

1.1 Query Cache

ATNative: Native ad loading class.

API Description
checkAdStatus Get the status object ATAdStatusInfo of the current Ad Placement. See the API description of the ATAdStatusInfo object below.
checkValidAdCaches Query the ATAdInfo objects of all cached info for the current Ad Placement. ATAdInfo: Ad information object, can distinguish ad platforms, mainly contains ID info of third-party Mediation platforms. See ATAdInfo Info Description

ATAdStatusInfo: Status object of the Ad Placement.

Method Description
isLoading Determine whether the current Ad Placement is currently loading an ad.
isReady Determine whether the current Ad Placement has a displayable ad.
getATTopAdInfo Get the ad cache info ATAdInfo object with the highest priority for the current Ad Placement. ATAdInfo: Ad information object, can distinguish ad platforms, mainly contains ID info of third-party Mediation platforms. See ATAdInfo Info Description

1.2 Ad Source Event Callbacks

ATNative: Native ad loading class.

API Description
setAdSourceStatusListener(ATAdSourceStatusListener listener) Set the Ad Source level event listener callback. ATAdSourceStatusListener is the interface class that needs to implement Ad Source level event callbacks. See ATAdSourceStatusListener Description

1.3 Others

ATNativeEventExListener: (Optional) Inherits from ATNativeEventListener, methods are the same as ATNativeEventListener, with additional callback descriptions as follows:

Method Description
onDeeplinkCallback(ATNativeAdView view, ATAdInfo atAdInfo, boolean isSuccess) Deeplink callback, for Adx, OnlineApi ads. isSuccess: Whether successful.
  1. China Mainland

NativeAd: The ad object obtained via getNativeAd.

Method Description
getVideoProgress Get the video playback progress (double type, unit: seconds). Supported platforms: GDT: Self-Rendering
getVideoDuration Get the total video duration (double type, unit: seconds). Supported platforms: Pangle (China): Self-Rendering, Template Rendering (can only be obtained after video starts playing) GDT: Self-Rendering, Template Rendering, Template Rendering 2.0 Kuaishou: Self-Rendering Baidu: Self-Rendering
resumeVideo Resume playback of a paused video. Supported platforms: GDT: Self-Rendering (only valid for video ad preview pages)
pauseVideo Pause video ad playback. Supported platforms: GDT: Self-Rendering (only valid for video ad preview pages)
setVideoMute(boolean isMute) Set whether to mute video during playback.
setAdDownloadListener(ATAppDownloadListener listener) Set the download status listener callback. listener: Download status event callback listener. Currently only supports the following platforms: Pangle (China) (Self-Rendering, Template Rendering), Kuaishou (Self-Rendering).
setDownloadConfirmListener(NativeAd.DownloadConfirmListener listener) Set the ad click app ad download event callback. (Currently only effective for GDT info feed ads.)

NativeAd.DownloadConfirmListener: (Optional) App-type ad download secondary popup listener class.

Method Description
void onDownloadConfirm(Context context, ATAdInfo atAdInfo, View clickView, ATNetworkConfirmInfo networkConfirmInfo) Callback method when an app-type ad click triggers a download. clickView: The view that triggered the download click (null if not obtained). ATNetworkConfirmInfo: Callback info provided by the third-party ad platform (Currently only GDT's GDTDownloadFirmInfo is available.) ATAdInfo: Ad information object, can distinguish ad platforms, mainly contains ID info of third-party Mediation platforms. See ATAdInfo Info Description

ATAppDownloadListener: (Only supported by China-region SDK) Download status event callback listener.

Currently only supports the following platforms: Pangle (China) (Self-Rendering, Template Rendering), Kuaishou (Self-Rendering).

Method Description
void onDownloadStart(ATAdInfo atAdInfo, long totalBytes, long currBytes, String fileName, String appName) Download start callback. ATAdInfo: Ad information object, can distinguish ad platforms, mainly contains ID info of third-party Mediation platforms. See ATAdInfo Info Description totalBytes: Total file size (unit: bytes). currBytes: Currently downloaded size (unit: bytes). fileName: File name. appName: App name corresponding to the file.
void onDownloadUpdate(ATAdInfo atAdInfo, long totalBytes, long currBytes, String fileName, String appName) Download progress update callback. Same parameter meaning as above.
void onDownloadPause(ATAdInfo atAdInfo, long totalBytes, long currBytes, String fileName, String appName) Download pause callback. Same parameter meaning as above.
void onDownloadFinish(ATAdInfo adInfo, long totalBytes, String fileName, String appName) Download complete callback. Same parameter meaning as above.
void onDownloadFail(ATAdInfo adInfo, long totalBytes, long currBytes, String fileName, String appName) Download failure callback. Same parameter meaning as above.
void onInstalled(ATAdInfo adInfo, String fileName, String appName) APK installation complete callback. Same parameter meaning as above.
Previous
Drawadvertising
Next
Error code description
Last modified: 2026-07-21Powered by