Hi Guys,
I’ve created a story app which I am adding admob to.
I have placed in each .lua page, the following to handle admob:
display.setStatusBar( display.HiddenStatusBar )
local adNetwork = "admob"
local appID = "Just My Book Title"
local ads = require "ads"
if appID then
ads.init( adNetwork, “ca-app-pub-xxxxxxxxxxxxxxxxxxxxx/XXXXXXXXX” )
end
.
.
.
then further down the page I use the following to try and show a banner.
ads.show( “banner”, { x=adX, y=adY, testMode=true} )
The simulator has no issue with this setup, except to tell me to “build” for a device to test it.
Unfortunately, when I build and transfer the apk to my Android phone, install and run, no ad appears.
My biggest uncertainty is that I cannot locate an AppID on my admob account, which is why I have just used my book title for “local appID”, and hardcoded the Ad unit ID into the “ads.init” request.
The only two numbers that admob website shows is the Ad unit ID for each Ad you create, and the Publisher ID that is given in the top right hand corner of your account.
I also noticed the Publisher ID you are assigned is integrated as part of your Ad unit ID. But neither of these appear to be the AppID that older posts and threads seem to reference.
Also, regarding build.settings , I have added the following in it for admob.
_ plugins = _
_ { _
[“CoronaProvider.ads.iads”] =
_ { _
_ publisherId = “com.coronalabs”, _
_ supportedPlatforms = { iphone = true }, _
_ }, _
_ _
[“CoronaProvider.ads.admob”] =
_ { _
_ publisherId = “com.coronalabs”, _
_ supportedPlatforms = { android = true }, _
_ }, _
_ }, _
I’m not sure if what I have done is correct and/or if there is anything missing. I have excluded an event listener as the guide I followed did not have one. Let me know if you have any ideas.
Many Thanks,
R.