admob not displaying in Android device . It is working in ios device
My code is:
build.settings:
plugins =
{
– key is the name passed to Lua’s ‘require()’
[“CoronaProvider.ads.admob”] =
{
– required
publisherId = “com.coronalabs”,
},
}
local ads = require(“ads”)
—Initialization
if adname == "iads"then
ads.init( “iads”,iadsAppId , adListener )
elseif adname == “admob” then
ads.init( “admob”, admobAppId , adListener )
end
–Showing
if adname == “iads” then
ads:setCurrentProvider(“iads”)
local adY = display.contentHeight
ads.show( “banner”, { x=0, y=adY } )
elseif adname == “admob” then
ads:setCurrentProvider(“admob”)
local adY = display.contentHeight
ads.show( “banner”, { x=0, y=adY } )
end
but ads not showing what is the problem?..
Did you received any warning message like '‘ads’ library is not available on this platform?
I posted on different thread, which if I just use this:
ads.show( “banner”, { x=0, y=adY } )
It won’t show any ads on device and with warning: ads library not available.
But if I write this instead:
if sysEnv ~= “simulator” then
ads.show( “banner”, { x=0, y=adY } )
end
Then I saw the ads on the devices. I’m not sure why it is so…
Did you received any warning message like '‘ads’ library is not available on this platform?
I posted on different thread, which if I just use this:
ads.show( “banner”, { x=0, y=adY } )
It won’t show any ads on device and with warning: ads library not available.
But if I write this instead:
if sysEnv ~= “simulator” then
ads.show( “banner”, { x=0, y=adY } )
end
Then I saw the ads on the devices. I’m not sure why it is so…