Menu

Native advertising exception

1. Advertisement loading exception

1.1 Advertisement is not filled or loaded with errors

Please refer to Advertisement No Filling Problem

1.2 Advertising no callback problem

1.2.1 Confirm whether the listening object is configured

  • Developers are asked to check whether the code has been The advertising object has monitoring set up, including every new advertising object;
  • The advertising object or listening object must be declared as a global variable. If they are both local variables, Will result in no result callback when loading

1.2.2 Check Is the integration correct?

  • Recheck the integration document: SDK access configuration, and confirm whether all files in the downloaded SDK compressed package are It has been introduced into the project. You can call the integration detection API to check the integration of the advertising platform
  • Check each advertising platform one by one to determine whether it is a problem with one advertising platform or all of them. Problems with advertising platforms:
  • 1. When an advertising platform does not have a callback:

(1) If there is only a callback for loading results and no subsequent callbacks such as display

(2) Developers are asked to check whether the code is in For load called in the callback of close, some advertising platforms do not support calling load in the callback before close, which will cause the problem of no callback. A typical example is Sigmob.

(3) Developers are asked to check the third-party advertising platform error code & FAQ document. If the solution is not found in the document, the developer is asked to In the project, use the advertising slot ID provided by the TopOn Demo test ID in our document to test

(4) If only one callback is missing, please change Test on other test machines to see if the same situation exists

1.2.3 Native No callback when the ad is clicked?

  • Check whether there is anything blocking the Native View
  • Check whether the prepare() method is called;
  • You need to use the same NativeAd object to call the setNativeEventListener(), renderAdView() and prepare() methods, each time getNativeAd is called () method will return different NativeAd objects

2 . Advertising display issues

2.1 Native and Banner ad display size There is a problem

Native ad display content is too large or too small, part of the ad content has been cut off, etc. These are generally the width and height in the code Caused by setting problems

1. Developers are asked to check according to the documentation whether the width and height are correctly passed before loading the advertisement. The width and height should be greater than 0, and before loading, the Whether the width and height passed in during display are consistent (Notes on template rendering)

2. Developers are asked to use Android Studio's Layout Inspector (Tools -> Layout Inspector) to check the current layout, check the width and height of the advertising View and the parent View. If a value of 0 appears, please recheck the previous step

2.2 The video screen is black or transparent

  • Pangolin ads need to be checked to see if they are missingWAKE_LOCKPermissions

2.3 Native ads cannot be displayed on Huawei 8.0 devices

Huawei 8.0 system will respond to ads with The "AdView" View is automatically set to GONE, causing TopOn's ATNativeAdView to not display properly.

Solution: Inherit the ATNativeAdView method through a custom View.

2.4 Huawei native advertising setting options



Map<String, 0bject> localMap = new HashMap>();

LocalMap,put(HuaweATConst.CUSTOM_DISLIKE, true);// Set the "X" close button to be displayed, and it will appear after clicking the close button "Hide ads" and "Why see this ad"

LocalMap.put(ATAdConst,KEY.AD_CHOICES_PLACEMENT,ATAdConst.AD_CHOICES_PLACEMENT_BOTTOM LEFT);//Control the close button Location

mATNative.setLocalExtra(localMap);

Option 2: Just close the ad directly For the "x" icon, keep an "i" icon

Add the following before loading the ad (requires Huawei overseas mobile phone):

Map<String, 0bject> localMap = new HashMap>();

LocalMap,put(HuaweATConst.CUSTOM_DISLIKE,true );//Set to display the "i" button

LocalMap.put(ATAdConst,KEY.AD_CHOICES_PLACEMENT,ATAdConst.AD_CHOICES_PLACEMENT_BOTTOM LEFT);//Control the "i" icon Location

mATNative.setLocalExtra(localMap);

An additional close button needs to be configured separately. Reference: (Set the close button)Enable hardware acceleration in AndroidManifest.xml

Last modified: 2025-05-30Powered by