Hello,
I’m using Interstitial and Banner ad in my game. I’d like to show Interstitial ads between game levels and banner ad while playing the game. For iAds the solution looks pretty straightforward because I init ads only once. But for AdMob I need to init either Interstitial or Banner app as they have different codes.
I’m using composer and in “Level1” scene I init banner app then in “Levels” scene I init interstitial. Unfortunately I get message in the console that Ads module was already initialized and interstitial ad is not working.
Level1.lua:
local ads = require "ads" if getSystem == "Android" then ads.init( "admob", "ca-app-pub-0000000000000/11111") else ads.init( "iads", "com.my.game") end showAd( "banner", display.screenOriginX, display.screenOriginY )
Levels.lua
local ads = require "ads" if getSystem == "Android" then ads.init( "admob", "ca-app-pub-0000000000000/22222") else ads.init( "iads", "com.my.game") end showAd( "interstitial", display.screenOriginX, display.screenOriginY )
is anybody using both interstitial and banner ads successfully?