Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

[RESOLVED] Vungle is not responding, and without feedback
Started by POM Oct 20 2014 12:08 AM

2 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

POM

[GLOBAL: userInfoPane.html]
POM
  • Contributor

  • 124 posts
  • Corona SDK

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"

 

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 )

 

Non of the events is being triggered in the Listener.

 

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

plugins =
    {
        ["plugin.google.play.services"] =
            {
                    publisherId = "com.coronalabs"
            },
        ["CoronaProvider.ads.vungle"] =
            {
                publisherId = "com.vungle",
            },
        ["facebook"] =
            {
                publisherId = "com.coronalabs",
            },
    },

 

Any advices?

 

Roy.



[TOPIC: post.html]
#2

BearHugGames

[GLOBAL: userInfoPane.html]
BearHugGames
  • Enthusiast

  • 33 posts
  • Enterprise

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 :(



[TOPIC: post.html]
#3

POM

[GLOBAL: userInfoPane.html]
POM
  • Contributor

  • 124 posts
  • Corona SDK

@BearHugGames

Here is the code I've made:

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

 

-- == ************************* [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
-- == *************************************************************** == --
 

 

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

 

Cheer up, you'll get it to work!

Roy.




[topic_controls]
[/topic_controls]