AdMob interstitial doesn't show

Hey,

I have problem with admob ‘interstitial’. It doesn’t show up. I tried Test banner and it works fine.

I’m using Level Director and composer.

I created unitId for interstitial advert: ca-app-pub-3xxxxx5174xx0263/xxxxxxxxxx 

local ads = require( "ads" ) local function adListener( event ) local msg = event.response -- Quick debug message regarding the response from the library print( "Message from the ads library: ", msg ) if ( event.isError ) then print( "Error, no ad received", msg ) else print( "Ah ha! Got one!" ) ads.show( "interstitial", { x=0, y=0 } ) \<\< ----------------- SHOW end end ------------------------------ function scene:create( event ) local screenGroup = self.view application.LevelDirectorSettings.viewGroup = self.view myLevel= LD:loadLevel("Level01") ....... ads.init( "admob", "ca-app-pub-3xxxxx5174xx0263/xxxxxxxxxx ", adListener ) \<\< --- INIT end function scene:show( event ) if ( phase == "will" ) then -- Called when the scene is still off screen (but is about to come on screen). elseif ( phase == "did" ) then ads.load( "interstitial", { testMode=true } ) \<\<-------- LOAD ............

Do you have any clue where’s the problem ?

I’m testing admob at my Samsung phone.

Thanks

You need to AppId’s from AdMob.  One for the banner, one for the interstitial.   If you’re doing both iOS and Android, you  need 4, one each for Android, one each for Apple.

When you call the ads.show() call  you have to pass in the AppId of the ad type you want in addition to the words “banner” or “interstitial”.

See the AdMob tutorial:   http://coronalabs.com/blog/2014/07/15/tutorial-implementing-admob-v2/

for more info.

Rob

I read this article before. 

I’m testing my game on Android and I made two unitId on adMob web site . One for banner and one for interstitial . 

I also checked http://docs.coronalabs.com/plugin/ads-admob-v2/load.html

and there’s “appId: The app ID. If this is not specified, the value provided to ads.init() is used instead.”

EDIT: I tried the same way as I tested banner:

function scene:create( event ) ... ads.init( "admob", "ca-app-pub-xxxxxx/xxxxxx", adListener ) -- full screen end function scene:show( event ) ads.show( "interstitial", { x=0, y=0, testMode = true } ) end

and it works. But I don’t know why the solution with Preloads an ad doesn’t work.

You need to AppId’s from AdMob.  One for the banner, one for the interstitial.   If you’re doing both iOS and Android, you  need 4, one each for Android, one each for Apple.

When you call the ads.show() call  you have to pass in the AppId of the ad type you want in addition to the words “banner” or “interstitial”.

See the AdMob tutorial:   http://coronalabs.com/blog/2014/07/15/tutorial-implementing-admob-v2/

for more info.

Rob

I read this article before. 

I’m testing my game on Android and I made two unitId on adMob web site . One for banner and one for interstitial . 

I also checked http://docs.coronalabs.com/plugin/ads-admob-v2/load.html

and there’s “appId: The app ID. If this is not specified, the value provided to ads.init() is used instead.”

EDIT: I tried the same way as I tested banner:

function scene:create( event ) ... ads.init( "admob", "ca-app-pub-xxxxxx/xxxxxx", adListener ) -- full screen end function scene:show( event ) ads.show( "interstitial", { x=0, y=0, testMode = true } ) end

and it works. But I don’t know why the solution with Preloads an ad doesn’t work.