丛林广告有时不会缓存 - 电晕

时间:2014-09-09 07:06:08

标签: ios lua corona vungle-ads

我已经在我的Corona游戏中集成了Vungle视频广告,但它在几天前完全停止了视频广告的缓存,但几天之后它就盯着它自己,而不会改变代码中的任何内容。现在它再次停止缓存视频广告。我怀疑这个问题要么来自Corona还是Vungle,但我不确定。

local vungleInterstitial = "540e9681c7ec2b6d4400000e" 
local videoCompletedCallback=nil


videoAddListener=function( event )

    if (event.isError ) then
        --Cached video ad not available for display
        print("problem to show ad")
    elseif event.type == "cachedAdAvailable" then
        print("cachedAdAvailable")
    elseif tostring(event.type) == "adView" then
        print("called when add is viewed")
    elseif  event.type == "adStart" then
        print("Corona ads started")
        audio.pause()
    elseif event.type == "adEnd" then
        print("Corona ads ended")
        videoCompletedCallback()
        audio.resume()
    end
end


    showVideoAd = function(callbackFunc)
        print("showVideoAd function called")
        videoCompletedCallback=callbackFunc;
        if ( vads.isAdAvailable() ) then
            print(" if ( vads.isAdAvailable() ) then, is true")
            print("vads.show")
            vads.show( "interstitial", { isBackButtonEnabled = false } )
        else
             local alert = native.showAlert( "Video Ad", "The Video Ad is not available at the moment. Please Try after some time.", { "OK" } )
        end 
    end

    vads.init("vungle",vungleInterstitial,videoAddListener)

1 个答案:

答案 0 :(得分:0)

这可能与地理位置或每日视图限制有关..您可以尝试使用vungleTest作为AppID吗?此外,如果您还有其他问题,请随时发送电子邮件至tech-support@vungle.com

干杯, Jordyn / Vungle