jeveli's Forum Posts

  • 3 posts
  • i have a html5 game that i have made in intel xdk, this is probably not the right forum but iam stuck

    I hava a app that i want to show the ads not on index.html but say on index1.html

    Everything works great on index.html with the admob script below, banner and interstitial shows up, but i dont whant them on index.html, i want them on index1.html. i delete the code from index.html and put it in index1.html no ads is showing up?

    Why is that?

    Whay i want them to index1 is that its not very user friendly to hav a interstitial to pop up 1sec after appstart.

    i was also thinking to call the interstitial on the first button click but i cant get that working either.

    iam using the AdMob Plugin Pro (cordova-plugin-admobpro)

    this is the admobpro script that i use in the html file:

    <script type="text/javascript" src="cordova.js"></script>

    <script>var admobid = {};

    if( /(android)/i.test(navigator.userAgent) ) {

    admobid = { // for Android

    banner: 'ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',

    interstitial: 'ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

    };

    } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {

    admobid = { // for iOS

    banner: 'ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',

    interstitial: 'ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

    };

    } else {

    admobid = { // for Windows Phone

    banner: 'ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',

    interstitial: 'ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

    };

    }

    if(( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) )) {

    document.addEventListener('deviceready', initApp, false);

    } else {

    initApp();

    }

    function initApp() {

    if (! AdMob ) { alert( 'admob plugin not ready' ); return; }

    AdMob.createBanner( {

    adId: admobid.banner,

    isTesting: false,

    overlap: false,

    offsetTopBar: false,

    position: AdMob.AD_POSITION.BOTTOM_CENTER,

    bgColor: 'black'

    } );

    AdMob.prepareInterstitial({

    adId: admobid.interstitial,

    autoShow: true

    });

    }</script>

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello! i have been using intel xdk and construct 2 for about a year now and have 10 or so apps in the itunes store, every app has a cookie consent banner.

    Now i have been using the cocoon.io and i like it alot, now my question do i need ti integrate the cookie consent banner in my apps, iam using admob ads in them.

    I dont think i ever seen a app with ads that have a consent banner...

    ive tried to search on google but with no luck...

    what are the developers using in here are?

  • did you find a solution? same problem

  • 3 posts