Vungle Ads: Detecting Delay in fetching ads

Hey Guys , 

We have placed a Video icon on game over screen of the game. 

When I Click the Video Icon , 

–> Sometime the video Plays immediately : Test Result : PASS 

–> Sometime it takes around 5-9 seconds for video show . Which is not a Good thing to have 

a. In such a scenerio user can click any other button on the screen, Which should not happen. How can i prevent user from tapping any other button. 

b. On click of video button , Can I Invoke a pop up . "Please wait Video ad is loading " ? 

ads.init( "vungle", appID, vungleAdListener ) function vungleAdListener( event ) if ( event.type == "adStart" and event.isError ) then -- Ad has not finished caching and will not play end if ( event.type == "adStart" and not event.isError ) then end if ( event.type == "cachedAdAvailable" ) then -- Ad has finished caching and is ready to play end if ( event.type == "adView" ) then -- An ad has completed end if ( event.type == "adEnd" ) then end if ( ads.isAdAvailable() ) then ads.show( "interstitial" , { isAnimated=false, isBackButtonEnabled=true }) end

Hi mashil,

My name is aki from Vungle.

Thanks for introducing Vungle into your app.

As the best practice of integration, you should disable all your buttons on UI (or pause game play or animation/sound) right before you call “ads.show”.

Depends on cases with internet access speed, heavy animation from app side, etc, it will produce a little lad before Vungle SDK starts an ad.

If you still see the same issue, please send to tech-support@vungle.com. So, we can help you out more efficiently.

Thanks,

-aki

Hey We tried the code below and it worked ,probably and is still under testing. 

lookingforvideo() function startads(event) if ( ads.isAdAvailable() ) then ads.show( "interstitial" , { isAnimated=false, isBackButtonEnabled=true }) else novideo() end if adtimer ~= nil then timer.cancel(adtimer) end adtimer = nil end adtimer= timer.performWithDelay( 300, startads )

Hi Mashil,

One thing to check.

Do you initialize Vungle SDK at start of you app?

It will take about 10~30 sec for Vungle SDK to prepare for an play. 

When you get “cachedAdAvailable”, you can know that an ad is ready to play.

Thanks,

-aki

Hi mashil,

My name is aki from Vungle.

Thanks for introducing Vungle into your app.

As the best practice of integration, you should disable all your buttons on UI (or pause game play or animation/sound) right before you call “ads.show”.

Depends on cases with internet access speed, heavy animation from app side, etc, it will produce a little lad before Vungle SDK starts an ad.

If you still see the same issue, please send to tech-support@vungle.com. So, we can help you out more efficiently.

Thanks,

-aki

Hey We tried the code below and it worked ,probably and is still under testing. 

lookingforvideo() function startads(event) if ( ads.isAdAvailable() ) then ads.show( "interstitial" , { isAnimated=false, isBackButtonEnabled=true }) else novideo() end if adtimer ~= nil then timer.cancel(adtimer) end adtimer = nil end adtimer= timer.performWithDelay( 300, startads )

Hi Mashil,

One thing to check.

Do you initialize Vungle SDK at start of you app?

It will take about 10~30 sec for Vungle SDK to prepare for an play. 

When you get “cachedAdAvailable”, you can know that an ad is ready to play.

Thanks,

-aki