Admob not calling adListener

Can anyone see anything wrong with my code below.  It does not seem to be calling the adListener function on android. 

local BANNER\_AD\_UNIT\_ID = "ca-app-pub-3940256099942544/6300978111" local ads = require( "ads" ) print ("BANNER ID " .. BANNER\_AD\_UNIT\_ID) local function adListener( event ) print ("ini ads") if ( event.isError ) then -- Failed to receive an ad print ("error ads: " .. event.response) else ads.show("banner", { x=0, y=0, appId = BANNER\_AD\_UNIT\_ID, testMode=true } ) print ("show ads") end end ads.init( "admob", BANNER\_AD\_UNIT\_ID , adListener )

I can see ‘BANNER ID …’ print in logcat, but no sign of ‘ini ads’, ‘error ads’ or ‘show ads’  any ideas ?

This is in my build.settings

settings = { plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } },  

I also get this warning ‘WARNING: CoronaProvider.ads.admob is not configured in build.settings’.

Thanks,

Allan

Managed to get it working.

I have moved ‘ads.init( “admob”, BANNER_AD_UNIT_ID)’ into my main.lua, removing the adListener function call.

I now have ‘ads.show(“banner”, { x=0, y=0, appId = BANNER_AD_UNIT_ID, testMode=true } )’ in the scene:show on my various scenes.lua’s.

Thanks, Allan

Managed to get it working.

I have moved ‘ads.init( “admob”, BANNER_AD_UNIT_ID)’ into my main.lua, removing the adListener function call.

I now have ‘ads.show(“banner”, { x=0, y=0, appId = BANNER_AD_UNIT_ID, testMode=true } )’ in the scene:show on my various scenes.lua’s.

Thanks, Allan