Im having a weird issue with the AdMob ads. When the game starts, the ads are shown, thats fine. If I move to a new scene with Director::getInstance()->replaceScene(); The new scene loads, the ads are there, all is fine.
But on Google Analytics it shows that the active screen is
com.google.android.gms.ads.AdActivity
even though I have set the screen name using
SonarCocosHelper::GoogleAnalytics::setScreenName("Game Scene");
The problem occurs when I press the home button on my Galaxy S4. The app moves to the background, then when it is opened again the banner ads are gone. If I then use the Quit button which calls Director::getInstance()->end(); the screen goes black but the game just reloads, and the ads are displayed again. Its like there is a layer being created over the game showing the ads that is closed when I first hit Quit.
Im putting it down to the com.google.android.gms.ads.AdActivity created for displaying the ads.
How do I get the banner ads to be displayed after the app is resumed from being in the background? Or close the com.google.android.gms.ads.AdActivity view when the game is put in the background and then create it again on resume?
Im having a weird issue with the AdMob ads. When the game starts, the ads are shown, thats fine. If I move to a new scene with
Director::getInstance()->replaceScene();The new scene loads, the ads are there, all is fine.But on Google Analytics it shows that the active screen is
com.google.android.gms.ads.AdActivityeven though I have set the screen name using
SonarCocosHelper::GoogleAnalytics::setScreenName("Game Scene");The problem occurs when I press the home button on my Galaxy S4. The app moves to the background, then when it is opened again the banner ads are gone. If I then use the Quit button which calls
Director::getInstance()->end();the screen goes black but the game just reloads, and the ads are displayed again. Its like there is a layer being created over the game showing the ads that is closed when I first hit Quit.Im putting it down to the
com.google.android.gms.ads.AdActivitycreated for displaying the ads.How do I get the banner ads to be displayed after the app is resumed from being in the background? Or close the
com.google.android.gms.ads.AdActivityview when the game is put in the background and then create it again on resume?