Pangle: A global platform dedicated to developer growth.|Integration Docs
Knowledge Center

Migrate to SDK v46

In order to optimize the intrgration experience, we will make some big changes of interface in version 4600 and use a new set of integrate methods. This document is an interface comparison for upgrading the old version to version 4600. You can also read the detailed document below for integrating. If you need to integrate the version below 4600, please jump to the old integration document.

Initialization

4500

4600

TTAdSdk

PAGSdk

- boolean isInitSuccess()

- boolean isInitSuccess()

-void init(final Context context, final TTAdConfig config, final InitCallback callback)

-void init(final Context context, final PAGConfig config, final PAGInitCallback callback)

-TTAdManager getAdManager()

N/A

4500

4600

InitCallback

PAGInitCallback

- void success()

- void success()

-void fail(int code, String msg)

-void fail(int code, String msg)

4500

4600

TTAdSdk

PAGConfig

- void setCoppa(int coppa)

- void setChildDirected(int coppa)

-int getCoppa()

-int getChildDirected()

-void setGdpr(int gdpr)

-setGDPRConsent(int gdpr)

-int getGdpr()

-int getGDPRConsent()

-setCCPA(int ccpa)

-void setDoNotSell(int ccpa)

-int getCCPA()

-int getDoNotSell()

4500

4600

TTAdManagerImpl

PAGSdk

- String getBiddingToken(String slotId)

- String getBiddingToken(String codeId)

- String getBiddingToken()

- String getBiddingToken()

-String getSDKVersion()

-String getSDKVersion()

4500

4600

TTAdManagerImpl

PAGConfig.Builder

- TTAdManager openDebugMode()

- PAGConfig.Builder debugLog(boolean debugLog)

-TTAdManager isUseTextureView(boolean isUse)

-PAGConfig.Builder useTextureView(boolean useTextureView)

-TTAdManager setAppId(String appId)

-PAGConfig.Builder appId(String appId)

-TTAdManager setTitleBarTheme(@TTAdConstant.TITLE_BAR_THEME int titleBarTheme)

-PAGConfig.Builder titleBarTheme(int titleBarTheme)

- TTAdManager setNeedClearTaskReset(String[] devices)

-PAGConfig.Builder needClearTaskReset(String... needClearTaskReset)

-TTAdManager setIconId(int appIconId)

-PAGConfig.Builder appIcon(int appIconId)

-TTAdManager debugLog(int debugLog)

- PAGConfig.Builder debugLog(boolean debugLog)

-void showPrivacyProtection()

N/A

-void requestPermissionIfNecessary(Context context)

N/A

-TTAdNative createAdNative(Context context)

N/A

-boolean isExpressAd(String rit, String adm)

N/A

-boolean isFullScreenVideoAd(String rit, String adm)

N/A

-boolean onlyVerityPlayable(String url, int orientation, String downloadUrl, String packageName, String deeplinkUrl)

N/A

-TTAdManager setName(String name);

N/A

-TTAdManager setPaid(boolean paid)

N/A

-TTAdManager setKeywords(String keywords)

N/A

-TTAdManager setData(String data)

PAGConfig.setUserData();

-TTAdManager setAllowShowNotifiFromSDK(boolean allow)

N/A

-String getSupportRegion()

N/A

-int getDebugLog()

N/A

4500

4600

TTAdManagerImpl

PAGConfig

-TTAdManager setCoppa(int coppa)

- void setChildDirected(int coppa)

-int getCoppa()

-int getChildDirected()

-TTAdManager setGdpr(int gdpr)

-setGDPRConsent(int gdpr)

-int getGdpr()

-int setGDPRConsent()

-TTAdManager setCcpa(int ccpa)

-void setDoNotSell(int ccpa)

-int getCCPA()

-int getDoNotSell()

4500

4600

TTAdConfig.Builder

PAGConfig.Builder

-TTAdConfig.Builder coppa(int coppa)

-PAGConfig.Builder setChildDirected(int coppa)

-TTAdConfig.Builder setGDPR(int gdpr)

-PAGConfig.Builder setGDPRConsent(int gdpr)

-TTAdConfig.Builder setCCPA(int ccpa)

-PAGConfig.Builder setDoNotSell(int ccpa)

-TTAdConfig.Builder appId(String appId)

-PAGConfig.Builder appId(String appId)

-TTAdConfig.Builder appIcon(int appIconId)

-PAGConfig.Builder appIcon(int appIconId)

-TTAdConfig.Builder titleBarTheme(int titleBarTheme)

-PAGConfig.Builder titleBarTheme(int titleBarTheme)

-TTAdConfig.Builder useTextureView(boolean useTextureView)

-PAGConfig.Builder useTextureView(boolean useTextureView)

-TTAdConfig.Builder supportMultiProcess(boolean supportMultiProcess)

-PAGConfig.Builder supportMultiProcess(boolean supportMultiProcess)

-TTAdConfig.Builder setPackageName(String packageName)

-PAGConfig.Builder setPackageName(String packageName)

-TTAdConfig.Builder debugLog(int debugLog)

-PAGConfig.Builder debugLog(boolean debugLog)

-TTAdConfig.Builder debug(boolean debug)

-PAGConfig.Builder debugLog(boolean debugLog)

-TTAdConfig.Builder needClearTaskReset(String... needClearTaskReset)

N/A

-TTAdConfig.Builder appName(String appName)

N/A

-TTAdConfig.Builder paid(boolean paid)

N/A

-TTAdConfig.Builder keywords(String keywords)

N/A

-TTAdConfig.Builder data(String data)

PAGConfig.Builder setUserData(String data)

-TTAdConfig.Builder allowShowPageWhenScreenLock(boolean allowShowPageWhenScreenLock)

N/A

-TTAdConfig.Builder setAllowShowNotify(boolean allowShowNotify)

N/A

-TTAdConfig.Builder asyncInit(boolean asyncInit)

N/A

Native

4500

4600

TTAdNative

PAGNativeAd

-void loadFeedAd(AdSlot adSlot, @NonNull FeedAdListener listener);

- void loadAd(String slotID, PAGNativeRequest request, @NonNull final PAGNativeAdLoadListener listener)



4500

4600

TTNativeAd#AdInteractionListener

PAGNativeAdInteractionListener

- void onAdClicked(View view, TTNativeAd ad)

- void onAdClicked();

- void onAdCreativeClick(View view, TTNativeAd ad)

- void onAdShow(TTNativeAd ad)

- void onAdShowed()

N/A

- void onAdDismissed();

4500

4600

TTFeedAd

PAGNativeAd

- void registerViewForInteraction(@NonNull ViewGroup container, @NonNull View clickView, AdInteractionListener listener)

- void registerViewForInteraction(@NonNull ViewGroup container, @NonNull List<View> clickViews, @Nullable List<View> creativeViews, @Nullable View dislikeView, PAGNativeAdInteractionListener listener);

- void registerViewForInteraction(@NonNull ViewGroup container, @NonNull List<View> clickViews, @Nullable List<View> creativeViews, AdInteractionListener listener);

- void registerViewForInteraction(@NonNull ViewGroup container, @NonNull List<View> clickViews, @Nullable List<View> creativeViews, @Nullable View dislikeView, AdInteractionListener listener)

- void registerViewForInteraction(@NonNull ViewGroup container, @NonNull List<View> imageViews, @NonNull List<View> clickViews, @Nullable List<View> creativeViews, @Nullable View dislikeView, AdInteractionListener listener);

N/A

- PAGNativeAdData getNativeAdData();


PAGNativeAdData

- void setPrice(Double auctionPrice)

- void setPrice(Double auctionPrice)

- TTImage getIcon();

- PAGImageItem getIcon();

- String getTitle();

- String getTitle();

- String getDescription();

- String getDescription();

- String getButtonText();

- String getButtonText();

- View getAdView();

- PAGMediaView getMediaView();

- List<TTImage> getImageList();

- TTImage getVideoCoverImage();

- Bitmap getAdLogo();

- View getAdLogoView();

- int getAppScore();

N/A

- int getInteractionType();

N/A

- int getAppCommentNum();

N/A

- int getAppSize();

N/A

- String getSource();

N/A

- int getImageMode();

N/A

- List<FilterWord> getFilterWords();

N/A

- TTAdDislike getDislikeDialog(Activity activity);

N/A

- TTAdDislike getDislikeDialog(TTDislikeDialogAbstract dialog);

N/A

- void showPrivacyActivity();

N/A

- String getAdCreativeToken();

N/A

- double getVideoDuration();

N/A

- double currentPlayTime();

N/A

- void setVideoAdListener(VideoAdListener videoAdListener);

N/A

- void play();

N/A

- void pause();

N/A

Banner

4500

4600

TTNativeExpressAd

PAGBannerAd

- void setPrice(Double auctionPrice);

- void setPrice(Double auctionPrice);

- void loss(Double auctionPrice, String lossReason, String winBidder);

- void loss(Double auctionPrice, String lossReason, String winBidder);

- void win(Double auctionBidToWin);

- void win(Double auctionBidToWin);

- View getExpressAdView

- View getBannerView();

- int getImageMode()

N/A

- List<FilterWord> getFilterWords();

N/A

- void setExpressInteractionListener(ExpressAdInteractionListener listener);

- void setAdInteractionListener(PAGBannerAdInteractionListener listener);

- void setExpressInteractionListener(AdInteractionListener listener);

- int getInteractionType();

N/A

- void render();

N/A

- void destroy();

- void destroy();

- void setDislikeCallback(Activity activity, TTAdDislike.DislikeInteractionCallback dislikeInteractionCallback);

N/A

- void setDislikeDialog(TTDislikeDialogAbstract dialog);

N/A

- void showInteractionExpressAd(Activity activity);

N/A

- void setSlideIntervalTime(int intervalTime);

N/A

- void setVideoAdListener(ExpressVideoAdListener videoAdListener);

N/A

- void setCanInterruptVideoPlay(boolean canInterruptVideoPlay);

N/A

- VideoControllerDataModel getVideoModel();

N/A

- Map<String, Object> getMediaExtraInfo();

- Map<String, Object> getMediaExtraInfo();

- String getAdCreativeToken();

N/A

TTAdNative


- void loadBannerExpressAd(final AdSlot adSlot, @NonNull NativeExpressAdListener listener)

- void loadAd(String slotId, @NonNull PAGBannerRequest request, @NonNull PAGBannerAdLoadListener listener)

4500

4600

TTNativeExpressAd.ExpressAdInteractionListener

PAGBannerAdInteractionListener

- void onAdClicked(View view, int type);

- void onAdClicked();

- void onAdShow(View view, int type);

- void onAdShowed();

- void onRenderFail(View view, String msg, int code);

N/A

- void onRenderSuccess(View view, float width, float height);

N/A

N/A

- void onAdDismissed();

4500

4600

TTNativeExpressAd.AdInteractionListener

PAGBannerAdInteractionListener

- void onAdClicked(View view, int type);

- void onAdClicked();

- void onAdShow(View view, int type);

- void onAdShowed();

- void onRenderFail(View view, String msg, int code);

N/A

- void onRenderSuccess(View view, float width, float height);

N/A

- void onAdDismiss();

- void onAdDismissed();

OpenAd

4500

4600

TTAppOpenAd

PAGAppOpenAd

- void setOpenAdInteractionListener(AppOpenAdInteractionListener listener)

- void setAdInteractionListener(PAGAppOpenAdInteractionListener listener)

- void showAppOpenAd(Activity activity)

- void show(@Nullable Activity activity)



TTAdNative


- void loadAppOpenAd(AdSlot adSlot, AppOpenAdListener listener, int timeOut)

- void loadAd(@NonNull String slotId, @NonNull PAGAppOpenRequest request, @NonNull PAGAppOpenAdLoadListener listener)

4500

4600

TTAppOpenAd#AppOpenAdInteractionListener

PAGAppOpenAdInteractionListener

- void onAdShow()

- void onAdShowed()

- void onAdClicked()

- void onAdClicked()

- void onAdSkip()

- void onAdDismissed()

- void onAdCountdownToZero()

- void onAdDismissed()



Interstitial

4500

4600

TTFullScreenVideoAd

PAGInterstitialAd

- void setFullScreenVideoAdInteractionListener(FullScreenVideoAdInteractionListener listener)

- void setAdInteractionListener(PAGInterstitialAdInteractionListener listener)

- void showFullScreenVideoAd(Activity activity)

- void show(@Nullable Activity activity)

- void showFullScreenVideoAd(Activity activity, TTAdConstant.RitScenes ritScenes, String scenes)


- int getInteractionType()


- void setShowDownLoadBar(boolean showDownLoadBar)


- Map<String, Object> getMediaExtraInfo()

- Map<String, Object> getMediaExtraInfo()

- int getFullVideoAdType()

N/A

- String getAdCreativeToken()

N/A

TTAdNative


- void loadFullScreenVideoAd(AdSlot adSlot, @NonNull FullScreenVideoAdListener listener)

- void loadAd(@NonNull String slotID, @NonNull PAGInterstitialRequest request, @NonNull PAGInterstitialAdLoadListener listener)

4500

4600

TTFullScreenVideoAd#FullScreenVideoAdInteractionListener

PAGInterstitialAdInteractionListener

- void onAdShow()

- void onAdShowed()

- void onAdVideoBarClick()

- void onAdClicked()

- void onAdClose()

- void onAdDismissed()

- void onVideoComplete()

N/A

- void onSkippedVideo()

N/A



Rewarded

4500

4600

TTRewardVideoAd

PAGRewardedAd

- void setRewardAdInteractionListener(RewardAdInteractionListener listener)

- void setAdInteractionListener(PAGRewardedAdInteractionListener listener)

- void showRewardVideoAd(Activity activity)

- void show(@Nullable Activity activity)

- void showRewardVideoAd(Activity activity, TTAdConstant.RitScenes ritScenes, String scenes)

N/A

- int getInteractionType()

N/A

- Map<String, Object> getMediaExtraInfo()

- Map<String, Object> getMediaExtraInfo()

- void setShowDownLoadBar(boolean showDownLoadBar)

N/A

- int getRewardVideoAdType()

N/A

- String getAdCreativeToken()

N/A

TTAdNative


- void loadRewardVideoAd(AdSlot adSlot, @NonNull RewardVideoAdListener listener)

- void loadAd(@NonNull String slotID, @NonNull PAGRewardedRequest request, @NonNull PAGRewardedAdLoadListener listener)

4500

4600

TTRewardVideoAd#RewardAdInteractionListener

PAGRewardedAdInteractionListener

- void onAdShow()

- void onAdShowed()

- void onAdVideoBarClick()

- void onAdClicked()

- void onAdClose()

- void onAdDismissed()

- void onVideoComplete()

N/A

- void onSkippedVideo()

N/A

- void onVideoError()

N/A

- void onRewardVerify(boolean rewardVerify, int rewardAmount, String rewardName, int errorCode, String errorMsg)

- void onUserEarnedReward(PAGRewardItem item)

- void onUserEarnedRewardFail(int errorCode, String errorMsg)