EddyVerbruggen / nativescript-admob

NativeScript plugin to earn some precious :moneybag::moneybag: with ads by Google AdMob
MIT License
69 stars 26 forks source link

Getting the height of the SMART_BANNER #85

Open arjes opened 4 years ago

arjes commented 4 years ago

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).

kakha13 commented 4 years ago

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

ReazerDev commented 3 years ago

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

kakha13 commented 3 years ago

@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