Forums

OverviewV-Play 1 Supportadmob interstitial help please › Reply To: admob interstitial help please

OverviewV-Play 1 Supportadmob interstitial help please › Reply To: admob interstitial help please
#7482

Jake

hey im still having issues…the issue is that when you get to the gameover screen I get no admob popup and none of the buttons work anymore to restart the game or get back to menu etc, and config has the proper admob plugin…this is what I have

 

ChartboostView.qml

import QtQuick 1.1
import VPlay 1.0
import VPlay.plugins.admob 1.0


AdMob {
      id: admob
  publisherId: "ca-app-pub-xxxxxxxxxxxxxxxxx"
  anchors.horizontalCenter: parent.horizontalCenter
  anchors.bottom: parent.bottom
  banner: AdMob.Standard320x50


 onInterstitialReady: {
    showInterstitialIfLoaded()
  }



 function showAdvertIfAvailable() {
       admob.shouldDisplayInterstitial = true
     admob.loadInterstitial()
  }

  function doNotShowAdvert() {
    admob.shouldDisplayInterstitial = false
     admob.loadInterstitial()
  }

      Component.onCompleted: admob.loadInterstitial()
}

 

ChickenOutbreak2Main.qml

ChartboostView {
    id: admob
  }

 

GameOverScene.qml

function prepareSceneExit() {
    audioManager.play(audioManager.idMENUCLICK)
    chartboostView.doNotShowAdvert()
    positionChange = 0
  }

  function enterScene() {

    if(!store.noAdsGood.purchased && !system.desktopPlatform) {
      if(!advertDeaths) {
        chartboostView.showAdvertIfAvailable()
      }
      advertDeaths++
      if(advertDeaths>=maxAdvertDeaths) {
        advertDeaths = 0
      }
    }

 

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support