Ads are only showing up on test mode. If test = false, then it doesn’t work.
-- App id and banner id for iOS and Android.
local app_id = {
['iPhone OS'] = 'ca-app-pub-3940256099942544~xxx',
Android = 'ca-app-pub-5196524521900794~xxx'
}
local banner_id = {
['iPhone OS'] = 'ca-app-pub-3940256099942544/xxx',
Android = 'ca-app-pub-5196524521900794/xxx'
}
local sysinfo = sys.get_sys_info()
local function listener(event)
if event.phase == 'init' then -- Admob has been initialized, now it's safe to load a banner.
admob.load{
type = 'banner',
id = banner_id[sysinfo.system_name],
size = 'smart',
position = 'bottom',
keywords = {'cars', 'game'}
}
end
end
-- Init Admob with your app id for the current platform.
admob.init{
app_id = app_id[sysinfo.system_name],
test = false, -- ALWAYS use test ads, only disable when submitting to the stores.
listener = listener
}