Menu

Android SDK access FAQs

This article contains answers to questions related to androi, Unity, Flutter, etc. If you cannot find the frequently asked questions in this article, you can also find them in FAQFind.

FAQ

1 Ad display without display success callback (keyword: no callback)

What is the advertising platform, what is the version of the advertising platform SDK, and whether you have initialized the advertising platform SDK yourself

Whether the demo has a callback and whether the replacement parameter triggers the callback

Please use the debug mode to filter anythink and print the complete log to see if there are any errors. Information

Check whether the real display is successful and the screen display area is not It will be too small, and secondly, whether the automatic mode and manual mode methods are confused

If not triggered, feedback to the corresponding advertising platform for consultation

2 There is no response when the skip button is clicked on the open screen advertisement (keyword: no response)

What is the advertising platform and what is the SDK version of the advertising platform?

Whether the demo responds and whether the replacement parameters respond

Check whether the layout is blocked

Print the log to see if the dismiss callback is triggered. If so, check the code processing logic

If it is not triggered, it can be fed back to the corresponding advertising platform for consultation

3 Incentive video close button does not respond (keyword: no response)

What is the advertising platform and what is the SDK version of the advertising platform?

Whether the demo responds and whether the replacement parameters respond

Check whether the layout is blocked

Whether you can click to close after the countdown is over is normal and is controlled by the advertising platform

If it is not triggered, it can be fed back to the corresponding advertising platform for consultation

4 screen opening advertising timeout (keyword: advertising timeout)

1. Place the preloading logic of other advertising forms and other requests that consume network resources after the opening screen ad display to reduce the loading timeout of the opening screen

2. Configure the bottom-up screen advertising source in the background to reduce loading timeouts (the bottom-side advertising will be in Ad loading is initiated 1 second after the ad loading is initiated. When the timeout is reached, if the bottom-end ad has been loaded successfully, onAdLoaded will be triggered. It is recommended to configure a high-fill advertising source as a cover advertisement)

3. Preset the bottom-up screen opening parameters during integration to improve the screen loading efficiency during first installation. For usage instructions, please refer to https://docs.toponad.com/#/zh-cn/android/android_doc/android_sdk_splash_access?id=splash_timeout. Note that this only has an effect on the first startup after the application is installed.

4. If you need to display open-screen advertisements during hot start, it is recommended that when the application retreats to the background, Call ATSplashAd.isAdReady() to determine whether there is a screen-opening ad cache, and if not, initiate load for preloading. Or call load during onAdDismiss to preload

5. In addition, optimization is done by adjusting the number of background waterfall flows and the number of parallel requests. This may need to be tested to know how to configure it to have a positive effect.

5. Whether the video can be muted and played automatically. Is it possible not to display the close button and other settings (keyword: advertising settings)

Please check whether there are relevant settings in the aggregation management advertising source configuration. If so, it can be configured or not. You can consult the corresponding advertising platform

6Taku Is there any interface method to close advertisements in advance (keyword: advertisement closing method)

The user can only click to close or use native self-rendering ads to set the closing click event

7 APP has applied for location permission in advance without informing the user of the purpose of using the permission. (Keyword: permissions)

Can be moved up the Manifest Get rid of ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION. In this way, the ad will not apply for positioning permission when loading. This may have an impact on revenue

8APP personalized recommendations The settings do not comply with relevant regulations (keyword: personalization)

You can use the switch to turn on or off the personalized recommendation advertising function, refer to the link

https://docs.toponad.com/#/ zh-cn/android/android_doc/privacy_policy_cn

9Taku can set up Google responsive banner ads? (Keyword: adaptive)

Yes, localExtras. put(AdmobATConst.ADAPTIVE_ORIENTATION,AdmobATConst.ORIENTATION_CURRENT);

localExtras.put(AdmobATConst.ADAPTIVE_TYPE,AdmobATConst.ADAPTIVE_ANCHORED);

localExtras.put(AdmobATConst.ADAPTIVE_WIDTH,width); Pass in the width and your desired width unit is px

10 timeout callbacks onAdLoadTimeout and onAdLoaded(boolean isTimeout) trigger logic (keyword: timeout)

1 Ad loading does not time out and callback onAdLoaded(false)

2 After the ad loading times out, onAdLoadTimeout is called back. The open-screen ad is still loading. If the loading is successful, onAdLoaded(true) will be triggered

11 We have configured the max sdk key on the platform; but the code display has not been pulled up, please ask What could be the reason? (Keyword: max)

Create a custom platform account And after applying to the operation for association max, the advertising source was created without re-editing the platform account (entering sdk_key). You should contact the operation association first, and then configure the advertising source

12 Huawei template advertising prompt selfRenderView cannot be empty. Huawei's advertising clicks have no callback onRewardedVideoAdPlayClicked (keyword: Huawei advertising)

Huawei does not have native template advertising, and Huawei itself does not provide this click Event callback

13 self-rendering information flow, excellent quantity I added an advertising icon myself, is there any way to remove it (keyword: advertising icon)

Before calling the prepare api, call ATNativePrepareInfo.setChoiceViewLayoutParams to pass in a FrameLayout.LayoutParams. You can pass in a negative marginLeft to remove the choiceicon outside the visible area

14 reasons for advertising loading failure statistics, {"code": "", "message": "Request Token or Custom bid info Timeout."} (Keyword: Ad loading failure)

Backend query data comparison, if the proportion of total requests is not high, That is normal and has something to do with the device network. If it is close to the total number of requests, check whether the maximum inquiry timeout in the advanced settings is set too small

15 Custom advertising platform interface access log error This network don't support head bidding in current Taku's version

(Keywords: customized ads)


16TakuSDK Is the interface successfully initialized? Are there any exposed interfaces and aggregated advertisements? How is the initialization of the SDK loaded (keyword: initialization)

The SDK initialization success interface is not provided. The initialization will be successful as long as it is called. You only need to pay attention to initialization first and then loading the advertisement. We only initialize the SDK of the advertising platform when the advertisement is loaded for the first time

17SDK’s handling of cached advertisements. If the APP process is killed, the SDK will Clear the ads that have been cached but not yet displayed (keyword: cache)

Yes, the advertising source configuration of the advertising space is disk storage, and the advertising cache is in memory. Kill the program and it will be gone

18onAdLoaded is different from the networkFirmId returned by onExposure. It is obtained by aTSplashAd calling atTopAdInfo

(Keyword: atTopAdInfo)

After displaying, getting atTopAdInfo will get the networkFirmId in the cache, so it is inconsistent. The current networkFirmId can be obtained directly through the AdInfo in the display callback.

19 Display the open-screen advertisement every time you return from the background to the front , are also Tencent's advertising sources. Sometimes this 4004, ad container is not visible error message appears, sometimes not, check that the container displaying the ad is always visible (keyword: 4004 Container is not visible)

20 Custom implementation of banner advertising. I have called onBannerAdShow with custom callback, but I still cannot receive onBannerShow or onBannerAutoRefreshed. What is the reason? This advertising platform banner does not display callbacks. I am loading After success, the display (keyword: custom ad) was called back

Delete mLoadListener.onAdCacheLoaded(); rewrite this method

@Override

public boolean supportImpressionCallback() {

   return false;

}

21 When there are two In the case of ads, which one will be played? (Keyword: cache)

Prefer the highest priced ones , you can see the weight and percentage in the backend of the advertising sources with the same price. The higher the weight, the higher the probability of display

22network SDK cannot get padding (keyword: no padding)

1 The developer views the complete log information of the failure to load the advertisement;

2 According to the log information, go to the error code table for troubleshooting. Address:https://docs.toponad.com/#/zh-cn/android/android_doc/ android_errorcode

3 in the background - advanced features - Log analysis to see if there is any error message

23network SDK prompt The appid and placement id are wrong (keywords: appid, placement id)

1. The advertising platform appid configured in Taku must be consistent with the advertising platform appid used elsewhere;


3. Try to avoid calling initialization multiple times at the same time for different aggregations

24Taku SDK prompts that the appid and placement id are wrong (keywords: appid, placement id)

1 Please check whether the appid passed in during SDK initialization is consistent with the one generated by Taku background

2 Please check whether the placement id passed in when loading the advertisement is generated by Taku background Consistent

3 Please check the appid and placementID initialized by the SDK Does it match?

25 Several ads were loaded successfully and returned Source, which advertising source is used to display the final advertisement (keyword: advertising display)

getATTopAdInfo can use this method to obtain the highest-priced advertising source when loading is completed, and finally display the highest-priced advertisement

26: Do we need to call mintegral’s setCoppa method ourselves? (Keyword: setCoppa)

requires topon version 6.1 .70 or above and the application configuration is selected to comply with the US coppa. In addition, the "age" passed in the initialization custom method initCustomMap is 13

27 When the Traffic Management Bureau platform detects that the APP is running and does not see related products or services corresponding to the usage rights, it will ask the user to open a pop-up window in advance to open the storage , device information and other permissions. ( Keyword: permission)

You can add it before initialization Some reasonable scenarios, such as adding a pop-up window description that we will apply for read permission, etc. Before applying for permission, pop up a box to tell him why we want this permission

28 Here we use topon’s banner, which is connected to Youlianghui. Now I found a problem, that is, when the banner is closed, a new banner will be refreshed immediately. After this is closed and displayed again, can we control this by ourselves? (Keyword: banner refresh)

We click by default Closing will call a refresh. If you don't want to refresh, you can remove the advertisement in the onBannerclose method of the code, and manually call the code to remove the ATBannerView from the parent layout

29Can the automatic refresh of banner ads only be set in the background? Can it be controlled in the code? (Keyword: banner refresh)

Yes, code There is no configuration in it, and it is controlled uniformly in the background

30 Yes For advertisement display, the statistics of scene ID are all counted by default, and the statistics of specific scene ID are not counted (keyword: scene)

Advertising scene display statistics need to pass in the scene id in the show method, entryAdScenario means entering scene statistics

How to fill in the sdk key for the 31max integration step? (Keyword: max)

This is a background advertising platform The configuration originally passed in json, and the format will be changed after the operation is associated first. Let us operate the association first and then fill in the configuration

32admob rewarded video tried to click on the ad, but the callback log was not triggered (keyword: no callback)

admob clicks on the ad itself and does not respond to click events. You need to click the install button to trigger the click callback

33 Get the Kuaishou self-rendering information flow advertisement, and the mainImageUrl of the advertisement cover of the returned material is empty (Keyword: self-rendering)

Display mediaView first, MainImageUrl is used to display when mediaView is empty

34 found part The user_id field returned in the server-side incentive callback is empty (keyword: incentive callback)

Check whether the user_id value is passed in the setLocalExtra method. The server will transparently transmit it after receiving it

35 server-side incentive callback not received (keyword: incentive callback)

First locate whether the onReward() callback is triggered. If there is no callback, you can consult the corresponding advertising platform to see if the ad is displayed normally

Secondly check whether the url format is normal and refer to the server-side incentive document https://docs.toponad.com/ #/zh-cn/android/NetworkAccess/rewardedvideo_s2s_doc_cn, whether the background configuration you just configured will take five minutes to take effect, request yourself through the web page to verify whether the server callback url is normal and whether there is filteringVerification logic

Whether it is finally configured on the advertising platform and topon. For example, if it is configured on the Pangolin platform, the Pangolin server will send a verification application to the developer server and needs to return true to accept the callback. It is recommended that you only need to configure it on one side. Just configure it

If there is still no callback, please contact topon technical support

36 How to obtain advertising cache (keyword: cache)

ATSplashAd.checkAdStatus() after the ad is loaded successfully. getATTopAdInfo() obtains the current advertising highest price cache object, checkvalidcaches is to obtain all cache lists, and must be judged empty. If there is no cache, it will return empty

37 When connecting topon, we found that after introducing the yandex sdk, the onCreate of the application will be executed multiple times. Yes Different process ids, what is going on? (Keyword: process)

The troubleshooting is in Yandex There is a provider using process=":Metrica". If you want to avoid calling the logic twice in the Application#onCreate method, you can first determine whether it is the main process in Application#onCreate and then execute your own logic. Specifically, determine whether it is the main process. Example code:

public boolean isMainProcess(Context context) {

   try {

       if (null !=context) {

           return context.getPackageName().equals(getProcessName (context));

       }

   } catch (Exception e) {

        return false;

   }

   return true;

}


public String getProcessName(Context cxt) {

   int pid = android.os. Process.myPid();

   ActivityManager am = (ActivityManager) cxt.getSystemService(Context.ACTIVITY_SERVICE);

   List runningApps = am.getRunningAppProcesses();

   if (runningApps == null) {

       return null;

   }

   for (ActivityManager.RunningAppProcessInfo procInfo : runningApps) {

       if (procInfo.pid == pid) {

           return procInfo.processName;

       }

   }

   return null;

}

38 is currently in a certain Under the traffic grouping under the defined rules, how to switch back to the default grouping without custom rules (keyword: traffic grouping)

In this case of switching, an empty map is passed

Can I get ecpm after 39 ads are filled but not displayed (keyword: ecpm))

Yes, after filling in, you can obtain ecpm through checkValidAdCaches cache information

40How often are topon statistics updated (keyword: statistics)

https://docs.toponad.com/#/zh-cn/android/NetworkAccess/faq/operation_faq? id=_5topon%e6%8a%a5%e8%a1%a8%e5%90%84%e9%a1%b9%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%96% b0%e6%97%b6%e9%97%b4

41 After exiting the app and opening it again, the first loading of ads is very slow, but the second loading is faster (keyword: first time)

This is usually the first time to load the initialization topon SDK strategy. Time-consuming impact, our new version 6.1.78 SDK supports prefabricating policies locally, which should be able to shorten this initialization time to a certain extent

http://docs.toponad.com/#/zh-cn/android/DeveloperAccess/sdk_preset_strategy/sdk_preset_strategy

42 Can the appid written into the app by admob be dynamically distributed and adjusted? (Keyword: admob)

admob’s appid is not Supports dynamic configuration through the API, which can only be declared in the manifest

43 As long as debug mode is turned on, java.Tang.UnsupportedOperationException will always report this crash (keyword: debugging)

Have you initialized other platforms in advance? Remove them before debugging

44 mtg debugging error Failed resolution of: Lcom/mbridge/msdk/interstitial/c/a; (keyword: debugging)


45 Does interstitial ads support active closing (keyword: interstitial)

There is no active closing method, you need to click to close manually

46 Please ask how to get the installation time (keyword: installation time)

Obtained through the system Api PackageInfo.firstInstallTime

47 react native's document access incentive video was successful, and then we want to use fully automatic loading mode (keyword: loading mode)

RN does not support fully automatic mode

48 Aggregation Management This aggregated request, why is it not equal to the sum of the number of requests from the following advertising sources? (Keyword: request)

The top is traffic Request, a traffic request may include multiple advertising source requests. For example, a traffic request may request multiple advertising sources from high to low

49 native self-rendering ads on Android. It was found that the pangolin has a close button. We have our own close button for self-rendering. How can I remove the pangolin? (Keyword: close button)

setCloseView and setDislikeCallbackListener will If you remove these two, the pop-up window of Pangolin will not be called. Just add a click event to the close button yourself

50 reported a crash of our SDK. We turned on Topon ADXandroid.content.res.Resources$NotFoundException: String resource ID #0x0 (keyword: resource)

51 The traffic fill rate of aggregation management is above 90%, and the traffic fill rate in the comprehensive report is around 70%. Why is this? (Keyword: fill rate)

The comprehensive report has Can you view it by advertising slot and version? Aggregation management only checks the fill rate of a certain advertising slot. The comprehensive report is all, you need to break it down

52 background log error meta advertising platform Under Review, adSourceld (keyword: log)

Check whether the status of the advertising platform is still under review

53 There is no response when clicking the skip button. The troubleshooting log found that after the open-screen ad was displayed, the relevant callbacks of ATSplashAdListener were not called, including onAdShow() and onAdDismiss(). Please check what is the reason (keyword: open screen)


Article picture


Or upgrade to version 6.2.21

unity issues

1 Removal or interrogation due to unityads Rejected (Keyword: Rejected from the shelves)

The international version of Unity's package does not contain UnityAds Splash code, but the domestic version does (the SDK version of UnityAds advertising source is no problem, but the APK exported by some games brings in some code of the lower version of UnityAds Splash). Re- Use the international version to publish the package for review

2 compile error ( Keywords: Compilation error)

Starting from Unity 2021.2, An error occurred during compilation: Exception:OBSOLETE - Providing Androidresources in Assets/Plugins/Android/reswas removed, please move yourresources to an AAR or an AndroidLibrary.

Reference documentation:https://docs.toponad.com/#/zh-cn/unity/unity_doc /unity_access_android_init_doc?id=_211-unity-20212%e5%8f%8a%e4%bb%a5%e4%b8%8a%e7%89%88%e6%9c%ac%ef%bc%88%e5%85 %b6%e4%bb%96%e7%89%88%e6%9c%ac%e8%a7%81%e4%b8%8b%e6%96%b9%e8%af%b4%e6%98%8e %ef%bc%89


article image


3unity packaging time is very long (keyword: packaging)

1 , Check the order of warehouse declarations in each gradle file (baseProjectTemplate.gradle, LauncherTemplate.gradle, MainTemplate.gradle) and ensure that mavenCentral() At the front, jcenter and google are placed at the back, and jcenter should be placed at the end

2. Check whether the gradle dependency of the SDK needs to be bypassed in order to be downloaded locally quickly

4unity how to debug ads (keyword: debug ads)

Unity does not support debugging mode, it is recommended to use demo id to test

flutter problem

1 error: SDK not found (keyword: not found)

method call error: io.flutter.plugin.common.Methodall@b4bfee0, Failed resolution of : sLcom/anythink/banner/api/ATBannerView:

Generally, the libs path error is as follows:



Correct The path is api fileTree(dir: '../../plugins/anythink_sdk/android/libs', include: ['*.aar', '*.jar'])

2NativeRender error report (keyword: NativeRender)

NativeRender has been abandoned, please download the latest flutter version



1 Change flutter.sdk in local.properties to your own path

2 Create new libs compile and add flutter.jar

3 depends on libs compile/flutter.jar (compileOnly fileTree(dir: libs compile , include: ['*.jar'])

compileOnly fileTree( dir: libs  , include: ['*.aar','*.jar'])





4 If you call PlatformBannerWidget in multiple places here, it will Error PlatformException(error, java.lang.IllegalStateException: The Android view returned from PlatformView#getView() was already added to a parent view. (Keyword: banner)

ATBannerManager.removeBannerAd() passes the ad slot id and calls this method when the banner is not displayed

5ERROR:/Users//Desktop//build/anythink.sdk/intemediates/merged .res/release/values/values.xm:585: AAPT: rror: resource android:atr/Star not found (keyword: resource)

Generally, this error will be reported when admob is integrated with other platforms. In this case, you need to forcefully specify the core version



Confirm whether this method startBiddingRequest has been overridden when customizing the Adapter, and return true 2. Check that the advertising platform appid configured by Taku is correctATSDK.setDebuggerConfig(context, AndroidID, new ATDebuggerConfig.Builder(Mintegral_NETWORK) .setInterstitial(Mintegral_INTERSTITIAL_VIDEO) .build());mtg’s debugging mode only supports video3flutter high version flutter.jar path is wrong (keyword: path)

Previous
Game abnormality
Next
Change log
Last modified: 2025-05-30Powered by