Linked Questions

Popular Questions

how to show phonegap admob outside the index.html

Asked by At

im using phonegap adbmob plugin in my web application, its works good just in index.html page, how can i use it in other pages ? here is my admob code for index.html

script>
        function onLoad() {       
        document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {
    }
     
    }
                admob.initAdmob("ca-app-pub-7193292113927984/6827828118","ca-app-pub-7193292113927984/3082780956");//admob id format ca-app-pub-xxxxxxxxxxxxxxxxxxx/xxxxxxxxxx

admob.showBanner(admob.BannerSize.SMART_BANNER,admob.Position.BOTTOM_APP);//show banner at the bottom of app 
//    admob.showBanner(admob.BannerSize.BANNER,admob.Position.TOP_APP);//show banner at the top of app 
        
         document.addEventListener(admob.Event.onInterstitialReceive, onInterstitialReceive, false);//show in ad receive event fun need add receive listener
        setInterval(function(){admob.cacheInterstitial(); admob.showInterstitial();}, 30000);
 admob.cacheInterstitial();// load admob Interstitial
 function onInterstitialReceive(message) {//show in ad receive event fun
     admob.showInterstitial();
 }
 </script>

Related Questions