capacitor-community / admob

Community plugin for using Google AdMob
MIT License
205 stars 67 forks source link

Retrieve AdSize again after addListener with a getter function getBannerSize() #262

Open heblol opened 11 months ago

heblol commented 11 months ago

Hi there, I am new to this plugin and I have a feature request.

Is your feature request related to a problem? Please describe. I cannot find how to get the height of a banner ad. I see the addListeneroptions, but after these are fired and my state changes, I do not see an option to get the size of the ad again. Now I am (very ugly) saving the state in localStorage.

Describe the solution you'd like I could like to see an option to say getBannerSize() -> BannerAdPluginEvents.BannerAdSize

Describe alternatives you've considered I am now saving the size in localStorage.

distante commented 11 months ago

The size is really determinated by Admob it self. We just send back what admob send us.

Each time the banner changes, if the size change the event should trigger again.

By experience, at least on android, it varies between 50px to 90px.