nativescript-admob icon indicating copy to clipboard operation
nativescript-admob copied to clipboard

Getting the height of the SMART_BANNER

Open arjes opened this issue 4 years ago • 3 comments

I'm trying to have an element of my app float just above the ad but since the SMART_BANNER type is different sizes on different screens I've got some banners covering the content.

Is there a way to programmatically get the loaded ad size? I saw the ios code (https://github.com/EddyVerbruggen/nativescript-admob/blob/master/src/admob.ios.js#L34) has the expected sizes, but in Android that just becomes the string constant.

Alternatively, I tried using the view option for createBanner but was unsure what exactly to pass into that parameter. (I'm using the angular wrapper).

arjes avatar May 10 '20 21:05 arjes

hey i think i found solution my gist How to get nativescript-plugin-firebase admob SMART_BANNER height

kakha13 avatar Jul 05 '20 14:07 kakha13

@kakha13 Thank you so much! You saved me hahaha. Can confirm that it works perfectly on android!

ReazerDev avatar Apr 02 '21 17:04 ReazerDev

@kakha13 Thank you so much! You saved me hahaha. Can confirm that it works perfectly on android!

Yea it works but i found better solution with Placeholder Monetize your NativeScript apps with AdMob

kakha13 avatar Apr 19 '21 17:04 kakha13