I’m trying to put ads in my game.
My game is not yet published in Google Play. Only when it has ads, I will publish it.
I created an account in admob and created a “banner” for an app wich name I wrote (there are a field to search an app in the android market but of course I dind’t use it because my app is not yet published).
Now I have:
app name: xxxxxxxx
banner name: bbbbbbbb
banner ID: ca-app-pub-68xxxxxxxxxxxxxxxxxxx
At top of admob site I see this:
publisher ID: pub-68xxxxxxxxxxxxxxxxxxx
(with real letters and numbers…)
Now in corona, I saw this link: http://docs.coronalabs.com/daily/plugin/ads-admob/
build.setting:
settings = { plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.ads.admob"] = { -- required publisherId = "com.coronalabs", }, }, }
I changed publisherId to my own admob publisher ID, but I get an error when I build for android…
Do I use my own publisherId or I must use allways “com.coronalabs” ???
main.lua ( http://docs.coronalabs.com/daily/api/library/ads/init.html )
local ads = require “ads”
local function adListener( event )
if event.isError then
– Failed to receive an ad.
end
end
ads.init( “admob”, “myAppId”, adListener )
ads.show( “banner”, { x=0, y=0 } )
What is appID? I only have the app name…
And “banner” is a reference to the bannerID that I have created in admob site???
When do I use my own publisherID and bannerID ?
Please help me
Thanks