Good day!
You can easily tell if I novice Corona
Set banner adMob only shown in full screen ( “interstitial”), tell me how to do that would show up banner 320 * 50 (“BANNER”)? I’ve done everything according to the instructions
local statusText = display.newText( “”, 0, 0, native.systemFontBold, 22 )
statusText:setTextColor( 255 )
statusText:setReferencePoint( display.CenterReferencePoint )
statusText.x, statusText.y = display.contentWidth * 0.5, 160
local showAd
– Set up ad listener.
local function adListener( event )
local msg = event.response
if event.isError then
statusText:setTextColor( 255, 0, 0 )
statusText.text = “Error Loading Ad”
statusText.x = display.contentWidth * 0.5
showAd( “BANNER” )
else
statusText:setTextColor( 0, 255, 0 )
statusText.text = “Successfully Loaded Ad”
statusText.x = display.contentWidth * 0.5
end
end
if appID then
ads.init( provider, appID, adListener )
end
– UI
local sysModel = system.getInfo(“model”)
local sysEnv = system.getInfo(“environment”)
showAd = function( adType )
local adX, adY = display.screenOriginX, display.screenOriginY
statusText.text = “”
ads.show( adType, { x=adX, y=adY } )
end
if sysEnv == “simulator” then
local font, size = native.systemFontBold, 22
local warningText = display.newRetinaText( “Please build for device or Xcode simulator to test this sample.”, 0, 0, 290, 300, font, size )
warningText:setTextColor( 255 )
warningText:setReferencePoint( display.CenterReferencePoint )
warningText.x, warningText.y = display.contentWidth * 0.5, display.contentHeight * 0.5
else
showAd( “interstitial” )
end