Code Monkey home page Code Monkey logo

Comments (11)

4ntoine avatar 4ntoine commented on June 12, 2024

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.

Mike-mei avatar Mike-mei commented on June 12, 2024

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.

4ntoine avatar 4ntoine commented on June 12, 2024

@Mike-mei Thanks for replying.

There's no HiAdKitLog.log there:
Снимок экрана 2021-01-13 в 12 23 42

HMS core version is "5.0.5.300"

Here are the files:
hw-logs.zip
hw-logs2.zip

from hms-ads-demo-java.

Mike-mei avatar Mike-mei commented on June 12, 2024

@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.

4ntoine avatar 4ntoine commented on June 12, 2024

@Mike-mei sure, today late evening or early tomorrow

from hms-ads-demo-java.

4ntoine avatar 4ntoine commented on June 12, 2024

@Mike-mei 2021-01-14 22:47:24.739 1377-1544 V:ActivityManage.zip

from hms-ads-demo-java.

chenqiuwei avatar chenqiuwei commented on June 12, 2024

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.

4ntoine avatar 4ntoine commented on June 12, 2024

@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.

chenqiuwei avatar chenqiuwei commented on June 12, 2024

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.

4ntoine avatar 4ntoine commented on June 12, 2024

@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.

chenqiuwei avatar chenqiuwei commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.