Adaptive Banners in Landscape too large

724 views
Skip to first unread message

Rutger

unread,
May 15, 2020, 8:42:35 AM5/15/20
to Google Mobile Ads SDK Developers

The situation is as follows. I have a Canvas with Canvas Scaler set to scale with screen width.
Reference resolution 1920x1080. Set to match Width (Match slider to 0f).

Adaptive Banners work fine on my tablet with resolution 1920x1200. But on my phone with resolution 2159x1080 it doesn't:

When requesting a fullsize ad (via `AdSize.GetLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(AdSize.FullWidth)`). I indeed get a banner filling almost the full width of the screen. But with a height of 236.  (Which is way too big. Almost 22% instead of the max 15% height, So should be 162 max.).
As measured from a screenshot and as reported by `bannerview.GetHeightInPixels()`. And `GetWidthInPixels()` reporting 2031 (likely/partially because of the safe area).
In other words, somehow a screen height of ~1574 is being reported.

To fix this it seemed likely to request a banner with `AdSize.GetLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(1920)`.
But I end up not receiving any ads.
Probably to do with the reported bannerview.GetWidthInPixels() being 5040.
And logcat reporting: `"Ad size will not fit on screen"`

All this was tested / reproduced using the sample HelloWorld project (with the necessary adjustments of course).

EDIT: Discovered something else. When having the device already in Landscape when starting up the app. The correct size is being requested / shown (162 pixels height).
When you startup holding it in Portrait (and turning it only later to Landscape). The issue appears.
Of getting to high/tall banners (236).

(The other issue, when requesting width 1920, exists in either case)

We'd love to be using Adaptive Banners, but this issue prevents us from doing that.
Please fix this. Thank you.

Adi Saputra

unread,
May 16, 2020, 6:29:05 PM5/16/20
to Google Mobile Ads SDK Developers
Pada Jumaat, 15 Mei 2020 8:42:35 ptg UTC+8, Rutger menulis:
> Is a repost of a comment on an issue about this. https://github.com/googleads/googleads-mobile-unity/issues/1068#issuecomment-622344487
>
>
>
> The situation is as follows. I have a Canvas with Canvas Scaler set to scale with screen width.Reference resolution 1920x1080. Set to match Width (Match slider to 0f).
Message has been deleted

Mobile Ads SDK Forum Advisor Prod

unread,
May 17, 2020, 10:57:33 PM5/17/20
to hang...@criticalbit.nl, google-adm...@googlegroups.com

Hi Rutger,

 

Thank you for reaching out to us.

 

Could you kindly provide the details below (via Reply privately to author) so that I can investigate the issue?

 

You may zip the entire Unity project (excluding the Library and Temp folders) in order to reduce its size, then send it to me via a shareable link from your Google Drive (or on any other file-sharing site that you prefer). Don't forget to send the shareable link via Reply privately to author.

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5004Q1zpnij:ref

Mobile Ads SDK Forum Advisor Prod

unread,
May 17, 2020, 10:59:15 PM5/17/20
to adi0...@gmail.com, google-adm...@googlegroups.com

Hi Adi,

 

Thank you for reaching out to us.

 

It seems that you posted an empty response on this thread. Kindly create a new thread if you have any concerns with the AdMob SDK so that we can assist you better.

Reply all
Reply to author
Forward
0 new messages