Vungle Incentivized video ads, HELP! Correct Callback?

ATTACHED PICTURE SHOWS BUTTON USED IN THE GAME.

I haven’t seen any documentation for Vungle incentivized ads…

I set up my ad listener and was wondering how I would go about checking if the user watched the full video, and where I would call to reset the game with there recent high score… thanks for the help in advanced!  :D 

Here’s the initialization and listener. I’m calling ads.show (“incentivized”) in my game.lua

Everything works great, just trying to reward the user for watching the whole video.

P.S. with incentivized if the user tries to exit out of the video early it will display a native pop up telling them that they wont be rewarded if they prematurely end the video ad.

I’m guessing theres an instance checking if they watched it returning a boolean value. 

[lua]

– Init Vungle here for the future

local ads = require “ads”;

local vungleAppID = “Test_iOS” 

function vungleAdListener( event )

    if ( event.type == “adStart” and event.isError ) then

        – Ad has not finished caching and will not play

        print(“notfinsihed caching”)

        --native.showAlert( “SORRY!”, “Video not availible.”, { “OK” })

    end

    if ( event.type == “adStart” and not event.isError ) then

        – Ad will play

        

     

    end

    if ( event.type == “cachedAdAvailable” ) then

        – Ad has finished caching and is ready to play

        --native.showAlert( “AVAILIBLE!”, “Video IS availible!!”, { “OK” })

    end

    if ( event.type == “adView” ) then

        – An ad has completed

    end

    if ( event.type == “adEnd” ) then

    if isCompletedView == true then

    native.showAlert( “80”, “Watched 80 percent of the video”, { “OK” })

    end

        – The ad experience has been closed- this

        – is a good place to resume your app

        --native.showAlert( “DONE”, “The Ad is done”, { “OK” })

    end

end

ads.init( “vungle”, vungleAppID, vungleAdListener)

[/lua]

How should I handle reseting the score?

Hi Austin, 

There’s actually another post about this bug, here:

http://forums.coronalabs.com/topic/54450-ios-813-problem-with-iphone-6-and-vungle-ad-feedback/

You’re doing it correctly but ‘isCompletedView’ isn’t firing. Please subscribe to that post for updates. 

You should resume your game when adEnd is called. Depending on how you’re keeping track of their score, you can look up / re-set the score then.

Jordyn

Developer Programs Engineer

Vungle

How should I handle reseting the score?

Hi Austin, 

There’s actually another post about this bug, here:

http://forums.coronalabs.com/topic/54450-ios-813-problem-with-iphone-6-and-vungle-ad-feedback/

You’re doing it correctly but ‘isCompletedView’ isn’t firing. Please subscribe to that post for updates. 

You should resume your game when adEnd is called. Depending on how you’re keeping track of their score, you can look up / re-set the score then.

Jordyn

Developer Programs Engineer

Vungle