cordova-plugin-ionic-keyboard icon indicating copy to clipboard operation
cordova-plugin-ionic-keyboard copied to clipboard

Conflict admob plugin

Open ocsi94 opened this issue 6 years ago • 2 comments

Conflicting admob plugin

Admob add a native view(google ad bar), the ad resize the webview to a like webViewHeight=deviceHeight-adHeight, when this plugin resize the webview just broke the admob plugin resize. Maybe a solution if store the webview height before open the keyboard. Qiuckfix: in bannerconfig set overlap: true, and add an element with 60px height

ocsi94 avatar Feb 15 '19 14:02 ocsi94

can you provide a sample app?

jcesarmobile avatar Aug 21 '19 16:08 jcesarmobile

Hey, So to repeat the symptom as i had it: When closing the keyboard when ad banner displayed at button the button bar would be hidden behind banner. looking at the banner's logic given what @ocsi94 said I saw that a resize happens on every ad show (even if ads already visible) So to provide a temporary fix, I have a boolean flag 'IsBannerShown' and I added a listener to keyboard hide and then call the ads.show() method:

 window.addEventListener('keyboardWillHide', () => {
            $timeout(function() {
                adsService.resizeBanner(); // this check is banner is currently shown and if so calls .show() method again
            }, 0);
        });

souly1 avatar Dec 09 '20 07:12 souly1