prebid / prebid-mobile-android

Prebid Mobile SDK for Android applications
Apache License 2.0
58 stars 82 forks source link

BannerAdUnit ignores width and height #722

Closed ValentinPostindustria closed 6 months ago

ValentinPostindustria commented 6 months ago

Describe the bug Starts from version 2.1.7. When you create BannerAdUnit with BannerParameters, it ignores the ad size passed in the constructor.

adUnit = new BannerAdUnit(CONFIG_ID, WIDTH, HEIGHT);

BannerParameters parameters = new BannerParameters();
parameters.setApi(Arrays.asList(Signals.Api.MRAID_2, Signals.Api.OMID_1));
adUnit.setBannerParameters(parameters);

As a result, the response will be:

Invalid request format: request.imp[0].banner has no sizes. Define "w" and "h", or include "format" elements

Expected behavior The ad size must be set up by the constructor if there is no ad sizes in BannerParameters.