Comments (11)
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.
from hms-ads-demo-java.
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 ./.
from hms-ads-demo-java.
@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
from hms-ads-demo-java.
@4ntoine The log you provided does not contain the info we need. Could you please provide the Logcat log which contain the error information?
from hms-ads-demo-java.
@Mike-mei sure, today late evening or early tomorrow
from hms-ads-demo-java.
@Mike-mei 2021-01-14 22:47:24.739 1377-1544 V:ActivityManage.zip
from hms-ads-demo-java.
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.
from hms-ads-demo-java.
@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?
from hms-ads-demo-java.
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.
from hms-ads-demo-java.
@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?
from hms-ads-demo-java.
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.
from hms-ads-demo-java.
Related Issues (20)
- Adding keywords breaks the JSON HOT 3
- 原生广告控件,不再显示该广告按钮无法显示 HOT 2
- InstreamAdsLoader compatible with ExoPlayer? HOT 2
- ad failed to load error code 2 HOT 1
- Ad failed with error code 0 - onAdFailed error code 499 HOT 13
- Ad load failed with error code: 3 HOT 7
- Ads error code: 0 HOT 1
- Ad load failed with error code: 3 for Splash Ad HOT 2
- Ads are available only on huawei phones? HOT 1
- Violation about Preventing invalid impressions HOT 4
- Can we test Huawei Ads on Samsung Device? HOT 1
- ad error code is 3 .自定义广告位请求成功,没有返回广告。 HOT 1
- Banner ad doesn't work in android library HOT 1
- from where i get the id ads? HOT 1
- APK link for the Ads Demo HOT 2
- Can screenshots be added to the Readme page? HOT 2
- Error code 2 HOT 2
- No banner ad is shown with "Ad failed to load with error code 0" message HOT 6
- 有没有办法获取真实广告而不是Test广告? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hms-ads-demo-java.