Admob banner ad height on Android and iOS

Hello,
I’m designing the UI for a mobile game (both Android and iOS) in which I want to put an Admob banner ad.
If I understood correctly, the actual banner’s height in pixels is not fixed, but it depends on the device’s screen DPI.
I have 3 questions:

  1. Did I understand correctly?
  2. How can I predict the maximum banner’s height in camera space, so I can leave an empty space in UI to host the banner ad without covering important elements?
  3. Does it work in the same way for both Android and iOS?

Any tip, hint or help of any kind is welcome, even if it doesn’t answer everything.
Thank you very much for your help! :slight_smile:

On Admob’s official documentation it says the Banner Ad’s height is 50 dp on phones and 90 dp on tablets. According to them, 1 dp is equal to 1 pixel on a screen with 160 DPI. Let’s say I setup a Canvas with a CanvasScaler component with the following values:

Ui Scale Mode: Physical size
Physical Unit: Points
Fallback Screen DPI: 160
Default Sprite DPI: 160
Reference Pixels Per Unit: 1

Does a Canvas configured in this way allow me, using a dummy Image component set with height of 50 (or 90), to preview in editor the size of the banner at the resolution set in Game View?

Just curious… did this work for you? I’m trying to do the same thing and am having issues trying to work out exactly how big the banner ad will be (in pixels) on each device.

I eventually gave up using banner ads, since I couldn’t manage to predict their space and design UI accordingly. I don’t remember what was wrong with this latest solution, but I suspect it didn’t work for all screens.

Anyway, banner ads now are a bit outdated in favor of interstitial and rewarded video ads. In some circumstances banner ads still fit better though, so any help would still be appreciated. :slight_smile:

Yeah, I’m surprised banner ads are still going! They’re like the cockroaches of the animal kingdom… they just don’t seem to die! :wink:

They work well as incremental revenue though when they’re persistent, hence I wanted to try and include them. If I figure out how to do it, I’ll post back here!

1 Like