question

fedeali avatar image
fedeali asked

How do I calculate what will the height of a banner ad be on devices?

I'm designing the UI of a mobile game in Unity, playable in Portrait orientation on both phones and tablets, iOS and Android. I would like to place a banner ad at the bottom, possibly wide as the screen width. I need to know how much space will the banner occupy in height, to optimize the placement of UI elements without having them covered by the banner, and without leaving more empty space than needed.

Since there are many different screens, in terms of size, resolution, ppi and aspect ratio, is it possible to predict the height of the banner on all possible screens at a specific aspect ratio? Or at least the range of minimum and maximum possible height?

Thank you in advance for your help.

mobile adsandroidiosunity
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fedeali avatar image fedeali commented ·

Sorry to write again, but I'm still stuck with this. Is there a way to predict the maximum height of the ad on every device? Please, any help/advice is welcome even if it doesn't offer a complete solution. Thank you again!

0 Likes 0 ·

1 Answer

Levon@Amazon avatar image
Levon@Amazon answered

Hi fedeali,

Thanks for posting! Have you checked the AdResized() event where you should be able to read the size of the ad in device independent pixels:

AdResized() event

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.