Skip to main content

Other Function Introduction

Turn off and trigger expiration detection#

  • V6.9.1+ support ,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,you can call SetAutoExpiration() and turn false off automatic expiration detection every 5 minutes.
  • If you call to SetAutoExpiration()turn off expiration detection, you need to call it to trigger an ad expiration detection before the game is about to display ads CheckAutoExpiration().
PlatformMethodNote
Unity3DTradplusAds.Instance().SetAutoExpiration(false)Turn off automatic expiration detection every 5 minutes.
By default true, ad expiration detection will be performed automatically.
Unity3DTradplusAds.Instance().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+ supportcall 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.
PlatformMethodNote
Unity3DTradplusAds.Instance().SetCnServer(true)The default is false, accessing overseas servers;
true, accessing domestic servers

Global display callback#

  • To facilitate developers to perform display data statistics, the SDK provides a global display callback API.
  • Supported versions: Unity plug-in version v1.0.4+, iOS v8.5.0+, Android v8.8.0.1+
  • Android Only: Developers need to call each type of listener synchronously to receive the GlobalImpressionListener listener, for example: incentive video settings TradplusRewardVideo.Instance().OnRewardVideoImpression += OnImpression;
TradplusAds.Instance().AddGlobalAdImpression(OnGlobalAdImpression);
void OnGlobalAdImpression(Dictionary<string, object> adInfo)
{
// Developers can obtain the display callbacks of all ad slots through this callback
}

For relevant field information of adInfo, please refer Ito: