Cordoba plugin admobpro refreshes the whole page when loading for the first time

English is not my first language, feel free to ask me any questions to clarify this issue.

Im using the admobpro plugin for my applications ionic/cordova.

This is the code I used to display banner ads:

if(( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) )) {
    document.addEventListener('deviceready', initApp, false);
} else {
    initApp();
}

function initApp() {

    AdMob.createBanner( {
        adId: admobid.banner, 
        isTesting: false,
        overlap: false, 
        offsetTopBar: false, 
        position: AdMob.AD_POSITION.BOTTOM_CENTER//,
        //bgColor: 'yellow'
    } );

}

The problem is that the whole page on which the banner is displayed will be reloaded / updated the first time the banner is displayed. This will cause the page to flash.

Is there a way to freely display a banner? (without blinking)

Thank you very much for your help

+4
source share

Source: https://habr.com/ru/post/1615708/


All Articles