Yes I try the App in the device and don’t go.
I put the code different parts but finally in main.lua :
local storyboard = require “storyboard”
local ads = require (“ads”)
DebugText = display.newEmbossedText(" DEBUG. :", 0, 0, “Arial”, 12)
DebugText.x, DebugText.y = display.contentWidth / 2, 20
DebugText:setFillColor(255,255,255)
local color =
{
highlight = { r=1, g=1, b=0, a=200 },
shadow = { r=1, g=0, b=0, a=128 }
}
DebugText:setEmbossColor(color)
– hide device status bar
display.setStatusBar( display.HiddenStatusBar )
– SHOW BANNER
function adListener( event )
local msg = event.response
if event.isError then
– Failed to receive an ad, we print the error message returned from the library.
print(msg)
reclame1 = display.newRect(0, 0, 320, 48)
reclame1:setFillColor(255, 255, 0)
reclame1:toFront()
DebugText.text = DebugText.text … “Error loading google ads”
else
DebugText.text = DebugText.text … “Sucess loading google ads”
end
end
DebugText.text = DebugText.text … “Initializing google ads”
print(“Initializing google ads”)
ads.init( “adMob”, “--------------------------------hide—”, adListener )
local adsx = display.contentWidth * 0.5
local adsy = display.contentHeight - 25
ads.show( “banner”, { x=adsx, y=adsy , interval=60, testmode =false})
storyboard.gotoScene( “menu”,“zoomOutInFade”, 500 )