HaxeExtension / extension-admob

OpenFL extension for "Google AdMob" on iOS and Android.
Other
58 stars 25 forks source link

get ad banner height? #30

Closed ramsestom closed 2 years ago

ramsestom commented 7 years ago

Is there a way to get the ad banner height? I thought the smart banner rule applied (https://firebase.google.com/docs/admob/android/banner) but that doesn't seems to be right on high definition screens (full HD), the banner seems to have a height > 90... So it would be good if we could retrieve the expected banner height directly from the lib

mastef commented 7 years ago

I just finished making such changes - it stores the getHeightInPixels() into a static var which you can then check from your app.

If you're interested I can attempt a PR

mastef commented 7 years ago

Here's the gists :

AdMobEx.java https://gist.github.com/mastef/e5e003b47830c867cb3da332b8f26ced/revisions?diff=unified

And AdMob.hx https://gist.github.com/mastef/3d755cb5c46e4c1615ef83e81389bbcd/revisions?diff=unified

Note : In my case I'm just interested in the biggest possible height, so I'm not updating it if the size gets smaller again.