Closed 4ntoine closed 3 years ago
Also the question: where can one find error codes explanation? eg. SO questions https://stackoverflow.com/questions/65689978/what-huawei-adskit-adlistener-onadfailed-errorcode-2-means and https://stackoverflow.com/questions/65691526/what-are-the-descriptons-for-huawei-adskit-adlistener-onadfailed-error-codes.
There's nothing in the doc.
Can you provide your complete log?
You can run this command to return the complete log, adb pull /sdcard/Android/data/com.huawei.hwid/files/Log/HiAdKitLog.log ./.
@Mike-mei Thanks for replying.
There's no HiAdKitLog.log
there:
HMS core version is "5.0.5.300"
Here are the files: hw-logs.zip hw-logs2.zip
@4ntoine The log you provided does not contain the info we need. Could you please provide the Logcat log which contain the error information?
@Mike-mei sure, today late evening or early tomorrow
Because the dpi of this phone is low, it is 320. and test slotid cannot obtain the ad of the corresponding size. Maybe you could use a high-resolution phone to test it. or set the resolution of your phone following this way: Settings > Display > Screen resolution , and select FHD+, and try again.
@chenqiuwei Not sure i understand, i expect SMART_BANNER as banner size to adjust to the devices specs (eg. screen size), no special size (layout_width, layout_height) is set in the app for it as far as i can see. Also 320x100 is shown successfully, and it's a bit surprising why not just fall down to it.
I'm testing on Honor 9S device and i can't find the setting. Probably i will test in cloud debugging.
Are there any requirements/recommendations for ad banners sizes per density, screen size, etc in order to avoid the issues like that?
https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/publisher-service-banner-0000001050066915-V5#EN-US_TOPIC_0000001057202899__section2706194414318 Screen Height of Honor 9S is 480dp (720x1440), it should return 720x100dp ad materials, no ad is returned because no test task of this size is launched.
@chenqiuwei i'm not sure i want to dive into details on how it works inside.
Can you give advices on when should it be/not_be used? It was expected that it's more efficient than just 1 hard-coded ad size. Should i detect screen density (probably just use default android "per-something" mechanism) and switch to another ad banner size? If yes, what are the other cases that should be covered?
As described in the development document, the Smart banner determines the ad size based on the screen height of the phone. In this case, the ad size may be different. Sometimes, the ad task may not cover so many sizes. I recommend using a fixed size such as BANNER_SIZE_320_50.
Thanks.
Testing on Huawei device with HMS core 5.
Failed to show an ad banner of size SIZE_SMART with "Ad failed to load with error code 3" message:![device-2021-01-12-234544](https://user-images.githubusercontent.com/846671/104358934-e729ce80-5530-11eb-8ded-2df771ca27fd.png)
The other sizes can be loaded:![device-2021-01-12-234645](https://user-images.githubusercontent.com/846671/104358951-ec871900-5530-11eb-8649-623a7d47fb58.png)
In the log i can see:
Log file ads_size_smart.txt.zip