Community
cancel
Showing results for 
Search instead for 
Did you mean: 
washington_p_
Beginner
45 Views

Como criar propaganda intersticial admob no intelxdk

Gostaria de saber se alguem tem script de propaganda intersticial para ser exibida no app, mas que faça seu pré carregamento em 1 variavel antes de ser exibida, segundo as novas regras do admob ela precisa ser exibida assim que clica em algum link para outra pagina, não pode ter delay. 

tenho um script mas ele abre quando inicia o app, queria ajuda para mudá-lo e fazer ele abrir quando clicar em 1 botão com função de analisar se ele já esta carregada ou não, caso esteja abra, caso não esteja recarregue. 

I would like to know if someone has interstitial ad script to appear in the app but prefaces uploading to 1 variable before it is displayed, according to the new admob rules it needs to be displayed as soon as you click on a link to another page, Can not have delay.

I have a script but it opens when I start the app, I wanted help to change it and make it open when I click on a button with parse function if it is already loaded or not, if it is open, if it is not reloaded.
<script src='cordova.js'></script>
    <script type="text/javascript">
        
        var onDeviceReady=function(){
            navigator.splashscreen.hide();
            initAdMob();
            showAdMobInterstitial();
            showAdMobBanner();
        };
        document.addEventListener("deviceready",onDeviceReady,false);
        
        function initAdMob(){
            if ( window.plugins && window.plugins.AdMob ) {
                var admob_key_banner = "colocar_aqui_sua_admob_key";
                var admob_key_interstitial = "colocar_aqui_sua_admob_key";
                window.plugins.AdMob.setOptions( {
                    publisherId: admob_key_banner,
                    bannerAtTop: true, // set to true, to put banner at top
                    overlap: false, // set to true, to allow banner overlap webview
                    offsetTopBar: true, // set to true to avoid ios7 status bar overlap                    
                    interstitialAdId: admob_key_interstitial,
                    autoShow: true, // autoshow intertitial Ad
                    isTesting: false // receiving test ad
                });
            } else {
                alert("AdMob plugin not ready");
            }
        }
        
        function showAdMobBanner(){
            window.plugins.AdMob.createBannerView();
        }
        
        function showAdMobInterstitial(){
            window.plugins.AdMob.createInterstitialView();
        }
        
    </script>
Tags (2)
0 Kudos
0 Replies
Reply