Admob indegration not show the ads


i put this

     <script type="text/javascript" src="cordova.js"></script>
> <script type="text/javascript">
> 	document.addEventListener("deviceready", function() {
> 	    setTimeout(function() {
> 	        navigator.splashscreen.hide();
> 	    }, 5000, false);
> 	});
> </script>

// Banner code
var service = Cocoon.Ad;

//multiplatform default configuration
android: {

var banner = Cocoon.Ad.AdMob.createBanner("ca-app-pub-3940256099942544/6300978111");
//Automatic banner layout

and this but not show the banner

the core is html and javascript without any framework js

What about cordova.js
should i download the file or it will be automatically added by the plugin

i dont put this in head
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

becouse change my layout


There is a tutorial on this site .Read & follow ,it should work fine.
Make sure your admob unit is working.
New unit may take 24 hours or more to start to serve ads.


This is the error from chrome console
Cocoon is not defined
at createBanner (test.js:18)
at test.js:65
var bannerStatus;
var interstitialStatus;

var banner;
var interstitial;
var demoPosition;

var backgroundTexture;
var button1Texture;
var button2Texture;

var adService;

var container;

function createBanner() {
// Global configuration

ios: {
android: {

      adService = Cocoon.Ad.AdMob;

      banner.on("load", function(){
         console.log("Banner loaded " + banner.width, banner.height);;

      banner.on("fail", function(){
         console.log("Banner failed to load");

      banner.on("show", function(){
         console.log("Banner shown a modal content");

      banner.on("dismiss", function(){
         console.log("Banner dismissed the modal content");

      banner.on("click", function(){
         console.log("Banner clicked");

var banner = Cocoon.Ad.createBanner();
banner.setPosition(100, 100);



Can anybody help
How to integrate admob ads in simple Html
The demo turorial in full with function
And why the console error is Cocoon is not defined


Have you also added the AdMob Cordova plugins to your projects?
Otherwise it won’t work.


i test in on html /javascript file, no another framework
i added cocon admob plugin from tutorial
but something in my code is not OK :slight_smile:
i paste my code above