Hi All,
Switching between iAd and Vungle is a must. I couldn’t get this to work (see attached image).
After wrestling with this all afternoon I’ve managed to switch between the two using the following:
[lua]
ads = require “ads”
ads.init(“iads”, “xxx”, AdCallback) – Bundle ID.
ads.init(“vungle”, “xxx”, AdCallback) – App ID.
ads:setCurrentProvider(“iads”)
.
.
.
ads.show(“banner”, {x = Screen.left, y = Screen.height})
.
.
.
ads.hide()
timer.performWithDelay(100, function()
ads:setCurrentProvider(“vungle”)
timer.performWithDelay(100, function()
ads.show(“interstitial”)
end, 1)
end, 1)
[/lua]
I should have arrived at this solution sooner rather than later as using timer delays has got me out of trouble numerous times with Corona.
You may also get this to work with a smaller delay or perhaps even removing one of the delays.
Hopefully Chartboost & Vungle combined will offset the diminishing RevMob eCPM I am experiencing. Kudos to Corona for putting more and more monetization options out there
Hope this saves some hair pulling!
Best,
Martin.