Skip to main content

Other function introduction

Turn off and trigger expiration detection#

  • V6.9.1 has a new API , which is called after the advertising slot object is created. These two methods are valid for global settings.
  • To prevent supplementary expired advertisements from occupying bandwidth during the game,can callsetAutoExpiration(),and turnfalseoff automatic expiration detection every 5 minutes.
  • If you call setAutoExpiration()to turn off expiration detection,you should before the game is about to display ads to callcheckAutoExpiration()to trigger an ad expiration detection
platformmethodillustrate
AndroidTradPlusSdk.setAutoExpiration(false)Turn off automatic expiration detection every 5 minutes.
By defaulttrue,ad expiration detection will be performed automatically
AndroidTradPlusSdk.checkAutoExpiration()Can actively trigger expiration detection (if there is an invalid advertisement, it will trigger loading)

|

Whether to access domestic server#

  • V7.0.40.1 adds new API call API before initializing SDK
  • Used to select TradPlus domestic server or overseas server. Generally no settings are required. Unless there are special needs, traffic can only be sent domestically and needs to be set up.
platformmethodillustrate
AndroidTradPlusSdk.setCnServer(true)The default is false, accessing overseas servers;
true, accessing domestic servers

Turn off flip display ad source information#

  • V8.5.0.1 supports only incentive videos and interstitial screens.
  • Enabled by default, pass false to disable.
  • Function introduction: When the advertisement is displayed, quickly flip the phone twice, and the TradPlus logo will appear on the edge of the screen. Click on the logo to see relevant information about the display advertising source, which is convenient for quickly locating the problem.
TPSensorManager.getInstance().setOpenSensor(false);

Set OAID#

Some advertising platforms require OAID for better monetization. The SDK does not obtain OAID by default. If you want to increase revenue, there are two options to set OAID:

Option 1: Developer obtains and passes it to TP#

TradPlusSdk.setDevOAID(context,"oaid obtained by the developer");

Option 2: TP to obtain#

  • The SDK will obtain OAID only after initialization is completed. It may not be available in time in some scenarios.
  • V10.2.0.1+ supported
  • Backend configuration, in the TradPlus backend, select Advanced Functions > Oaid Management , click " Add Configuration ", select the application you want to open and click Save

Set UID2#

  • Android V10.1.0.1+ starts to support
  • It is recommended to set and obtain before initializing TPSDK
  • If you have obtained the UID2Token by yourself, you can also set it according to the following code
UserDataInfo userDataInfo = new UserDataInfo();
userDataInfo.setAdvertisingToken(token);
TPSettingManager.getInstance().setUserDataInfo(userDataInfo);

Turn off the "Last round of loading failed, no further loading is allowed within 10s" advertising mechanism#

  • Android V10.3.0.1+ starts to support
Map<String, Object> mLocalSettingExtras = new HashMap<>();
mLocalSettingExtras.put("limit_reload_close", true);
TPSettingManager.getInstance().setSettingDataParam(mLocalSettingExtras);