Menu

How to Test

1. Enable the TopOn SDK Log

πŸ’‘Note: Before publishing your app, you need to disable the logging feature.

ATSDK.setNetworkLogDebug(true);

 

● Get the GAID

  • Open Android Studio's Logcat and use "anythink" to filter the logs. When the TopOn SDK is initialized, it will print logs regarding the device ID as follows:
    anythink: ****************************************************************************
    anythink: GAID(ADID): b796a53f-61bf-4e91-bc67-d505cdb97cf8 , AndroidID: f669f2b7137d82b9
    anythink: ****************************************************************************

πŸ’‘If the value of GAID is not printed, please check whether the device being used has Google services installed. You need to test with a device that has Google services.

 

● An example of the Log

╔═══════════════════════════════════════════════════════════════════════════════════════
β•‘ {
β•‘     "placementId": "b5bbdc725768fa",
β•‘     "adType": "inter",  //ad format
β•‘     "mixedFormatAdType": -1,
β•‘     "action": "request_result",  //"request": ad request; "request_result": request result; "impression": show ad; "click": ad click; "close": ad close
β•‘     "refresh": 0,
β•‘     "result": "fail",  //action result
β•‘     "segmentId": 0,  //the segment to which the ad source belongs; 0: the default segment
β•‘     "adSourceId": "1423289",
β•‘     "position": 0,  //the sort position of the ad source within the ad placement
β•‘     "networkType": 6,  //TopOn uses a unique ID to distinguish networks. The corresponding relationships can be viewed(https://docs.toponad.com/#/zh-cn/android/android_doc/android_access_doc?id=network_firm_id)
β•‘     "networkName": "Mintegral",
β•‘     "networkVersion": "MAL_16.1.41",
β•‘     "networkUnit": "{\"is_video\":\"0\",\"video_muted\":\"0\",\"suport_video\":\"1\",\"appkey\":\"ef13ef712aeb0f6eb3d698c4c08add96\",\"unitid\":\"1726152\",\"appid\":\"100947\"}",  //the config for this ad source in the TopOn dashboard (corresponding to the network's app and ad unit settings).
β•‘     "isHB": 0,//whether it is a header bidding ad source
β•‘     "msg": "code:[ 4001 ]desc:[ Return Ad is empty. ]platformCode:[  ]platformMSG:[ EXCEPTION_UNIT_ADTYPE_ERROR ]",  //if the loading fails, complete error msg will be output here
β•‘     "hourly_frequency": 0,  //the number of times displayed in the current hour
β•‘     "daily_frequency": 0,  //the number of times displayed in the current day
β•‘     "network_list": "6,6,6",  //the ID of the network request list, separated by ","
β•‘     "request_network_num": 1,  //the number of network ad sources whose loading is initiated simultaneously (corresponding Setting -> Request of the TopOn dashboard)
β•‘     "handle_class": "com.anythink.network.mintegral.MintegralATInterstitialAdapter"  //the class name that calls the Network API
β•‘ }
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

⚠️Note

  • If "result": "fail", it indicates an error occurred with the ad action. You need to review the log for "msg", formatted as below:
"code[ " + code + " ],desc[ " + desc + " ],platformCode[ " + platformCode + " ],platformMSG[ " + platformMSG + " ]"

code: the error code of the TopOn SDK
desc: the error msg of the TopOn SDK
platformCode:the error code of the Network
platformMSG:the error msg of the Network

You can look up TopOn Error Code based on the code and desc. If code=4001, you need to refer to platformCode and platformMSG for Network Error Code.

 

2. Debugger Tool of the TopOn

It is a suite of testing tools. These tools help you integrate and launch faster with TopOn. You can use them to confirm the validity of network integrations. This ensures that you can successfully load and show ads, among other things.

● Integration Status: Use this to confirm that you successfully completed the network integration.

● Testing with Test Ads: Use this to load and show ads from networks by using each network’s test mode.

● Testing with Live Ads: Use this to load and show ads from networks by means of your waterfall configuration.

● Sharing the Mediation Debugger: Use this to generate a copy of your integration checklist. You can send this to reviewers before you launch.

 

2.1 Changelog

● v1.1.1

  1. Supports the latest version of the TopOn SDK
  2. Fixed known issues

● v1.0.8

  1. Add support for Kwai
  2. Add support for the Banner Ad, Native Ad and Intersitial Ad of the TopOn ADX
  3. Supports TopOn SDK v6.2.70 - v6.3.80.

πŸ’‘Note: When using debugger tool, pay special attention to the following content:

  1. Whether the integration display for the Network is correct.
  2. Check if the requests, displays, and clicks for each Ad Format are working normally.

 

2.2 How to import

(1) Refer to the TopOn SDK Integration Guide and integrate the SDK.

(2) Import the testing tool by adding a reference in build.gradle.

repositories {
    maven {
        url "https://jfrog.anythinktech.com/artifactory/debugger"
    }
}
dependencies {
    implementation 'com.anythink.sdk:debugger-ui:1.1.1'
}

(3) Launch the debugger tool

// Please call this function after the SDK has been successfully initialized
ATDebuggerUITest.showDebuggerUI(context);

 

2.3 How to use

2.3.1 The base info


πŸ’‘Note

If GAID is empty, you will not be able to use the debugger tool for testing. If it is empty, please check the following:

  1. Whether Google Play Services is installed and up-to-date on the device.
  2. Check if the code has called either of the following methods, as both can restrict access to the GAID:
    ATSDK.deniedUploadDeviceInfo(DeviceDataInfo.GAID);
    
    ATSDK.setGDPRUploadDataLevel(ATSDK.NONPERSONALIZED);

 

2.3.2 TopOn SDK Settings

TopOn SDK settings include: Privacy Settings and Permission Settings.

(1) Privacy Settings

(2) Permission Settings

 

2.3.3 Integration Status

It displays the integration status of the TopOn-mediated network adapters and/or SDKs found in your app. It flags integration issues associated with each network (such as a mismatch between the network SDK and adapter version). It displays the integration status of mediated networks in three sections:

● Completed Integrations: You successfully integrated these ad networks into your app.

● Exceptional Integrations: These ad networks have one or more issues you need to fix before you can integrate them successfully into your app. Tap on the cell for more information.

● Miss Integrations: You have not integrated these ad networks into your app.

 

2.3.4 Testing with Test Ads

(1) Enable Debug Mode

(2) Select the network that need to enter debug mode.

(3) Select an ad format to test.

 

2.3.5 Testing with Live Ads

πŸ’‘Note

  1. SDK Version: v6.3.68 and above
  2. Testing Tool Version: v1.0.5 and above
  3. Disable the debug mode
  4. Setting the SDK Debug Key (TopOn dashboard -> My Account -> Key -> SDK Debug Key)

(1) How to use 

// Init SDK
ATSDK.init(context, "your app id", "your app key");
// Setting the debug key
ATDebuggerUITest.showDebuggerUI(context, "your debug key");

(2) Online Test

(3) Placement Test

 

3. Debug mode of the TopOn

  • Using the debug mode, you can test the integration of an individual network by utilizing TopOn's test ad sources for that network.
  • Call the API to set this before initializing the TopOn SDK.
  • For bidding ad sources, this mode only supports testing with Meta and TopOn ADX.

 

3.1 Networks supported by debug mode

● Meta(BiddingοΌ‰

Tips:

  1. Meta has a high fill rate in the US.

  2. The Facebook app must be installed and logged in on the test device.

  3. The App ID and Placement ID prefixes for Meta ad sources are consistent.

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Facebook_NETWORK).build());
// Advanced
ATSDK.setDebuggerConfig(context, AndroidID, new ATDebuggerConfig.Builder(Facebook_NETWORK).setNativeType(nativeType).build());

nativeType: set the native ad type, supporting the following types:
    Facebook_NATIVE_SELF_RENDER, Facebook_NATIVE_BANNER_TEMPLATE,
    Facebook_NATIVE_TEMPLATE, Facebook_NATIVE_BANNER_SELF_RENDER

 

● AdMob

Tips:

  1. AdMob has a high fill rate in the US.
  2. The test device must have Google Play and be able to retrieve the GAID.
ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Admob_NETWORK).build());
// Advanced
ATSDK.setDebuggerConfig(context, AndroidID, new ATDebuggerConfig.Builder(Admob_NETWORK).setNativeType(nativeType).setInterstitial(interType).build());

nativeType: set the native ad type, supporting the following types:
    Admob_NATIVE_IMAGE, Admob_NATIVE_VIDEO
interType:set the interstitial ad type, supporting the following types:
    Admob_INTERSTITIAL_IMAGE, Admob_INTERSTITIAL_VIDEO

 

● Mintegral

Tips: Mintegral has a high fill rate in the European and the US.

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Mintegral_NETWORK) .setInterstitial(Mintegral_INTERSTITIAL_VIDEO).build());
// Advanced
ATSDK.setDebuggerConfig(context, AndroidID, new ATDebuggerConfig.Builder(Mintegral_NETWORK).setNativeType(nativeType).build());

nativeType: set the native ad type, supporting the following types:
    Mintegral_NATIVE_SELF_RENDER, Mintegral_NATIVE_TEMPLATE

 

● Nend

Tips: Nend has a high fill rate in the US.

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Nend_NETWORK).build());
// Advanced
ATSDK.setDebuggerConfig(context, AndroidID, new ATDebuggerConfig.Builder(Nend_NETWORK).setInterstitial(interType).build());

interType: set the interstitial ad type, supporting the following types:
    Nend_INTERSTITIAL, Nend_INTERSTITIAL_VIDEO, Nend_INTERSTITIAL_FULL_SCREEN

 

● Huawei

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Huawei_NETWORK).build());
// Advanced
ATSDK.setDebuggerConfig(context, AndroidID, new ATDebuggerConfig.Builder(Huawei_NETWORK).setNativeType(nativeType).setInterstitial(interType).build());

nativeType: set the native ad type, supporting the following types:
    Huawei_NATIVE_VIDEO,  Huawei_NATIVE_IMAGE, Huawei_NATIVE_BIG_IMAGE
interType: set the interstitial ad type, supporting the following types:
    Huawei_INTERSTITIAL_IMAGE, Huawei_INTERSTITIAL_VIDEO

 

● TopOn ADX

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Adx_NETWORK).build());
// Advanced
ATSDK.setDebuggerConfig(context, AndroidID, new ATDebuggerConfig.Builder(Adx_NETWORK).setNativeType(nativeType).setInterstitial(interType).setBannerType(bannerType).build());

nativeType: set the native ad type, supporting the following types:
    ADX_NATIVE_EXPRESS_LEFT_PIC_RIGHT_TEXT, ADX_NATIVE_EXPRESS_LEFT_TEXT_RIGHT_PIC
    ADX_NATIVE_EXPRESS_TOP_PIC_BOTTOM_TEXT, ADX_NATIVE_EXPRESS_TOP_TEXT_BOTTOM_PIC
    ADX_NATIVE_SELF_RENDER
interType: set the interstitial ad type, supporting the following types:
    Adx_INTERSTITIAL_FULL_SCREEN, Adx_INTERSTITIAL_HALF_SCREEN
bannerType: set the banner ad type, supporting the following types:
    ADX_BANNER_SIZE_320_50: 320x50
    ADX_BANNER_SIZE_320_90: 320x90
    ADX_BANNER_SIZE_300_250: 300x250
    ADX_BANNER_SIZE_728_90: 728x90

 

● InMobi

Tips: InMobi has a high fill rate in India

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Inmobi_NETWORK).build());

 

● AppLovin

Tips: AppLovin has a high fill rate in China and the US

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Applovin_NETWORK).build());

 

● Chartboost

Tips: Chartboost has a high fill rate in China and the US

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Chartboost_NETWORK).build());

 

● Tapjoy

Tips: Tapjoy has a high fill rate in Singapore and the US

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Tapjoy_NETWORK).build());

 

● IronSource

Tips: IronSource has a high fill rate in China

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Ironsource_NETWORK).build());

 

● Unity Ads

Tips: Unity Ads has a high fill rate in the US

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(UnityAds_NETWORK).build());

 

● Vungle

Tips: If you are unable to successfully bid even after enabling the bidding debug mode, you can add a test device in the Vungle. Test Mode and Test Devices – Vungle

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Vungle_NETWORK).build());

 

● Maio

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Maio_NETWORK).build());

 

● Start.io

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(StartApp_NETWORK).build());

 

● MyTarget

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(MyTarget_NETWORK).build());

 

● Fyber 

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Fyber_NETWORK).build());

 

● Pangle

Tips: Pangle has a high fill rate in South Korea and Japan.

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(Pangle_NETWORK).build());

 

● Bigo

Tips: Bigo has a high fill rate in Singapore

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(BigoAds_NETWORK).build());

 

● Kwai

ATSDK.setDebuggerConfig(context, GAID, new ATDebuggerConfig.Builder(KWAI_NETWORK).build());

 

3.2 Networks not supported by debug mode

  • You can use the test IDs from the TopOn Demo for testing.
  • By following the output logs and placement ID, you can track various ad actions.
Previous
Testing Networks
Next
Error Codes
Last modified: 2025-07-31Powered by