[RESOLVED] Vungle is not responding, and without feedback

Hey guys, 

Im having some issues with vungle…

The function call is not returning…

Also, the log on the device is silent.

Im on Corona Version 2014.2393 (2014.8.5)

Build for device (since this version cannot build for simulator for me) , iPhone 4S, IOS 7.1.1

Using a code from “coronaplugin-release-master”

[lua]

local provider = “vungle”

– replace with your own Vungle application ID

local appId = “myAppIdIsHere”

– load Corona ‘ads’ library

local ads = require “ads”

function functionAdListener( event )

– video ad downloaded and available

if event.type == “cachedAdAvailable” then

ads.show( “interstitial” )

– video ad displayed and then closed

elseif event.type == “adEnd” then

end

end

ads.init( provider, appId, functionAdListener )

[/lua]

Non of the events is being triggered in the Listener.

This is what I have in the build.settings in the settings section:

[lua]

plugins =

    {

        [“plugin.google.play.services”] =

            {

                    publisherId = “com.coronalabs”

            },

        [“CoronaProvider.ads.vungle”] =

            {

                publisherId = “com.vungle”,

            },

        [“facebook”] =

            {

                publisherId = “com.coronalabs”,

            },

    },

[/lua]

Any advices?

Roy.

Hi Roy, just wondered how you resolved this? I’m having the same issue and there’s very little documentation as to how to set up vungle on their dashboard.

My callback just isn’t getting called, running on the device.

At a bit of a loss :frowning:

@BearHugGames

Here is the code I’ve made:

I hope it will help you out, it currently works for me in test mode.

[lua]

– == ************************* [Vungle] ************************* == –

    local VUNGLE_APPID = {

        apple   = {ID = “########”},

        google  = {ID = “#########”} 

    }

     

    local function vungleListener(event)

        print("[Info] - Received event:")

        vardump( event ) – a function to parse the event

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

            if (event.isError) then

                    print("[Error] - there was an error loading vungle, moving on to chartboost")

                    chartboostInit()

            else

                print("[Info] - vungle loaded successfully")

                for i = 2, 32 do – silence any sound effects for the video

                    audio.setVolume( 0, { channel=i } )

                end

                audio.setVolume( 0 ,{ channel=1 } ) – silence the music for the video

            end

            

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

            print("[Info] - setting volume back on for SFX")

            for i = 2, 32 do – return volume

                audio.setVolume( GameSettings.soundOnOff, { channel=i } )

            end

            print("[Info] - setting volume back on for MUSIC")

            audio.setVolume( GameSettings.musicOnOff/2 ,{ channel=1 } ) 

            print("[info] - hiding ad overlay")

            storyboard.hideOverlay()

        end

    end

    function vungleInit()

        print("[Info] - Vungle init was called")

        --if on simulator then skip vungle

        if (currentEnvironment==“simulator”) then

            chartboostInit() 

            return

        end

        ads.init(“vungle”, VUNGLE_APPID[TargetStore].ID, vungleListener)

        ads.show( “interstitial”, { isBackButtonEnabled = true } )

    end

– == *************************************************************** == –

[/lua]

[lua]

function scene:enterScene(e)

    print("[Info] - Starting the Ad chain - start with vungle")

    if (connection.test()) then 

        vungleInit()

    else

        print("[DEBUG] - the user is not connected to the internet")

        myAdInit() – a local custom made ad for my other games.

    end

end

[/lua]

Cheer up, you’ll get it to work!

Roy.

Hi Roy, just wondered how you resolved this? I’m having the same issue and there’s very little documentation as to how to set up vungle on their dashboard.

My callback just isn’t getting called, running on the device.

At a bit of a loss :frowning:

@BearHugGames

Here is the code I’ve made:

I hope it will help you out, it currently works for me in test mode.

[lua]

– == ************************* [Vungle] ************************* == –

    local VUNGLE_APPID = {

        apple   = {ID = “########”},

        google  = {ID = “#########”} 

    }

     

    local function vungleListener(event)

        print("[Info] - Received event:")

        vardump( event ) – a function to parse the event

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

            if (event.isError) then

                    print("[Error] - there was an error loading vungle, moving on to chartboost")

                    chartboostInit()

            else

                print("[Info] - vungle loaded successfully")

                for i = 2, 32 do – silence any sound effects for the video

                    audio.setVolume( 0, { channel=i } )

                end

                audio.setVolume( 0 ,{ channel=1 } ) – silence the music for the video

            end

            

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

            print("[Info] - setting volume back on for SFX")

            for i = 2, 32 do – return volume

                audio.setVolume( GameSettings.soundOnOff, { channel=i } )

            end

            print("[Info] - setting volume back on for MUSIC")

            audio.setVolume( GameSettings.musicOnOff/2 ,{ channel=1 } ) 

            print("[info] - hiding ad overlay")

            storyboard.hideOverlay()

        end

    end

    function vungleInit()

        print("[Info] - Vungle init was called")

        --if on simulator then skip vungle

        if (currentEnvironment==“simulator”) then

            chartboostInit() 

            return

        end

        ads.init(“vungle”, VUNGLE_APPID[TargetStore].ID, vungleListener)

        ads.show( “interstitial”, { isBackButtonEnabled = true } )

    end

– == *************************************************************** == –

[/lua]

[lua]

function scene:enterScene(e)

    print("[Info] - Starting the Ad chain - start with vungle")

    if (connection.test()) then 

        vungleInit()

    else

        print("[DEBUG] - the user is not connected to the internet")

        myAdInit() – a local custom made ad for my other games.

    end

end

[/lua]

Cheer up, you’ll get it to work!

Roy.