Hello!
I’ve been working on adding an “interstitial” style ad to my app (already using “banner” type ads in app, without a problem), at the beginning the was a “problem”, I got a message saying “Ad request successful, but no ad returned due to lack of ad inventory.”, which I read that is normal in the first couple of hours after you activate the service, so I waited, and indeed, after a couple of hours I stopped getting that message, but no ad was showing up too.
So at the this point, my code does not generate errors, does now show anything out of the ordinery, except that no ad is shown, not on android, not on iOS. my code:
local env = system.getInfo("environment"); local ads\_appID2 = "ca-app-pub-xxxxxxxxx/xxxxxxxxx"; local ads2 = require "ads"; local function ads\_Listener2(event) timer.cancel(ad\_timout); -- cancel a timeout set for the ad to do anything... local msg = event.response; if msg == "Ad request successful, but no ad returned due to lack of ad inventory." then someFunction(); elseif event.isError then someFunction(); end end if env ~= "simulator" then ads2.init(ads\_provider,ads\_appID2,ads\_Listener2); end local showAd2 = function() if env ~= "simulator" then ad\_timout = timer.performWithDelay(5000, someFunction); ads2.show("interstitial",{x=0,y=0}); --to be sure also used ads2.show("interstitial"); end end
As far as I can see, my code is fine, and it does not throw any errors, what could be the problem??
Thanks!