admob-plus / admob-plus

Trustable AdMob Plugin for Cordova, Capacitor, Ionic, React Native
https://admob-plus.github.io
MIT License
361 stars 150 forks source link

Dismissing Interstitial moves Banner Ad #611

Open r2uan opened 8 months ago

r2uan commented 8 months ago

I've just updated my plugin to the latest version and finding this issue on ios

I put the Adaptive Banner Ad on display, it displayed fine, then display and interstitial, dismiss it, and the banner ad has moved into the unsafe area and gets cut off a bit. You can see with the below screenshots, the first screenshot is before the interstitial is displayed

ss1

and then after dismissing the interstitial, you can see the banner has gone lower

ss2

I made a fresh cordova project, with only this plugin installed "admob-plus-cordova 2.0.0-alpha.13" and used the example source code (minus the consent js) and also getting the same issue

Anyone know of a fix for this?

martinchamrad commented 8 months ago

I have the same problem. Here is a quick workaround I implemented:

document.addEventListener('admob.ad.show', function (evt) { // check if the shown ad is interstitial and hide the banner
banner.hide() })

document.addEventListener('admob.ad.dismiss', function () { interstitial.load() setTimeout(function () { // load banner again banner.load() }, 100) })

The banner automatically shows once it loads. I listen to "admob.ad.load"