Hi, I’m trying to add admob banner into my game.
Start of main.lua
local storyboard = require("storyboard") storyboard.purgeOnSceneChange = true ads = require "ads" local function adListener( event ) if event.isError then local alert = native.showAlert( "error", "error", { "ok" } ) end end ads.init( "admob", "my\_key\_is\_here", adListener )
build.settings:
android =
{
usesPermissions =
{
“android.permission.INTERNET”
},
},
plugins =
{
– key is the name passed to Lua’s ‘require()’
[“CoronaProvider.ads.admob”] =
{
– required
publisherId = “com.coronalabs”,
},
},
and on scene I call this:
ads.show( “banner”, { x=centerX, y=screenBottom - 50, testMode=true } )
And I’m getting “error” message, but can’t debug where’s a problem.