Using this code:
local ads = require( "ads" ) local appId = "ca-app-pub-0123456789012345/0123456789" local function adMobListener( event ) local height = ads.height() print("Local height: ",tostring( height)) print( "Height in listener: "..ads.height()) end ads.init( "admob", appId, adMobListener ) ads:setCurrentProvider( "admob" ) ads.show( "banner", { x=0, y=0 } )
This printed in my console.log:
I/Ads (29368): Ad finished loading.
I/Corona (29368): Local height: 47.6
I/Corona (29368): Height in listener: 47.6
If you are not getting height values, we probably need to see your build.settings and config.lua. This appears to be working as expected.
Rob