Android Question Admob Adverts not displaying on Galaxy s8+ and s9+ in Landscape

chris ash

Licensed User
Longtime User
Hi guys

Hoping you may be able to help me out. I think this may be just something I am missing but I cannot see anyone else with the issue so I thought I would ask.

Ok so using a standard setup for ads through firebase etc etc. All works well, all has worked great forever really. On all manner of devices, even the S8 and S9 phones (Non + versions) work absolutely fine.

However on the S8+ and S9+ where its a landscape app (#SupportedOrientations: landscape) no adverts are shown. It does say ad received but nothing shows up on screen. (Worth noting Portrait apps work fine)

I use the regular code for the ad setup (as below)

If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
If 100%x > 100%y Then height = 32dip Else height = 50dip
height = 90dip
End If
Activity.AddView(BannerAd, 0dip, 100%y - height, 100%x, height)

So the above runs on the S9+, no ad is displayed and if I check the logs I get an error stating "Not enough space to show ad. Needs..." Implying that is needs a height of 50dip. I have researched this and all over the Google documentation pages, it states this is caused by the space for the ad not being large enough. The above code returns 32dip which is not the 50dip that the ads seem to require.

If I scrap the above code and just pass it 50dip as the height the ads are shown.

Is this something anyone else has come across, and if so do we have a workaround or an updated version of the above code for setting up the ads that will work on all devices?

Thanks in advance for any assistance