Vungle v4 Documentation

Has anyone been able to get v4 working in the newer builds?  The documentation appears to be quite split as to when and when not to use ‘vungle-v4’ and there’s never a great overview in the documentation.

Such as here:

vungle-v4.init( providerName, appId [, adListener] )

Should that be vungle-v4.init(‘vungle’) or should it be ads.init(‘vungle’) or should it be ads.init(‘vungle-v4’).   It feels like someone found half of the references to the word Vungle and replaced it with Vungle-v4 without going back and checking if anything was coherent.   Later in the .show documentation is has this line in the example:

ads.init( “vungle”, “myAppId”, adListener )

Which doesn’t match up to the example given in .init documentation.

Just curious, thanks!

I have it working (or did about 20 builds ago).  I haven’t tested this for about a month.

I use this statement to init:

ads.init( "vungle", ID\_HERE, LISTENER\_HERE ) 

Subsequently, I use calls like this to interact with the provider plugin:

ads.setCurrentProvider("vungle") ads.isAdAvailable() -- ads.setCurrentProvider("vungle") ads.getVersionString() -- etc.

So you don’t need to specify v4 anywhere like it says to?

I don’t.

If you can’t get this working, I can put together a small sample project as a level 1 hit.

https://forums.coronalabs.com/topic/69420-hire-a-hitman-problem-solver-is-back/

It will include my ‘demo’ IDs.  You can then put in yours to test it and go from there.

Of course, you’d be better off using Vungle 5. I can put together a level 2 hit for that, including some screens to show you how to set up your ads on Vungle.

I tried v5 back when it was having issues and figured I was better off using the older until they got it sorted.  But that also meant that I was locked on an older Corona build as the v4 documentation was horrible.  I should be good from here though, thanks!

Have you had good success with v5?   I know there were some threads with issues early on but maybe it has all settled down now.

@Fernker - Sorry I don’t have any metrics on which works better.

Oh sorry, didn’t mean actual results, just like implementation between the 2.

Oh, I have gotten ads from both successfully.  i.e. I have used the both with success (in test apps).

Do you have the right thing in your build settings?  See:

https://docs.coronalabs.com/plugin/vungle-v4/index.html

https://docs.coronalabs.com/plugin/vungle/index.html

Notice that one uses “CoronaProvider.ads.vungle” vs. “plugin.vungle”.  It’s a subtile difference but it’s how we tell them apart.  Vungle was one of our earliest plugins when we were using the old “CoronaProvider” method so it would be the same API as Apple’s iAd, 1st get AdMob, etc.  But we now use our plugin system, so when Vungle moved forward with v5, we left the v4 plugin as a CoronaProvider type plugin.

Please make sure your build.setting is accessing the right plugin name.

Rob

Yeah I had noticed that and that made sense.  It’s just that the documentation says you have to use vungle-v4 everywhere yet as roaminggamer has said that isn’t necessary.  So it was just confusion on my part (and bad documentation) that caused me to ask.

Actually, what I said is, “I have been using the ads.* interface and not it doing the way the docs prescribe.”  

My Vungle 4 code is based on the ‘old style’ where ads.* was the primary entry-point.

I never said the docs were wrong.  I just don’t do it that way.

I use both and both work just fine

I’m using the Github Vungle sample from this below link - 

https://github.com/Vungle/Corona-Plugin/tree/sdk5

I’ve changed the AppID and PlacementID to my own demo IDs. 

Is the code here supposed to work without any change?

Have you tried it with their AppID and Placement IDs?

I did a quick scan of the code and other than they are including the really, really old AdMob/Google Play Services plugin, it looks like it should work.

Rob

I used their App ID and Placement IDs too. It got to the second step where after Init, their Load Ad button got activated. But nothing happened after I tapped Load Ad. 

With my App ID and Placement IDs, I couldnt even initiate. And I cant see the errors. 

I couldnt test the Ads it in the Emulator/Debugger as expected where there’s a log. And apparently there’s no way to see logs when deployed on a physical device. 

Could really use your help Rob? Others?

Almost no Ad provider is going to work in the Corona simulator because the ad providers are making SDK’s for Android and iOS, not Windows and macOS so you have to test on a real device.

If you’re building from a Mac, when you choose the option to “Install to device”, we do route the device’s console log to the Corona console log so you can easily watch what’s going on with the device. If you’re building an Android app from Windows, you will have to either use Android Studio or “adb logcat” to watch the device’s console log for errors.

See: https://docs.coronalabs.com/guide/basics/debugging/index.html#consoledevice-debugging

which should help you get “adb” setup and learn to use it.

Rob

Thats great. I’ll check out adb for logging. 

But the sample ad not working is really depressing. Thats the only component which is left in my game.

Could you help by providing a working Vungle code sample?

Actually, Vungle has a different sample app: https://github.com/Vungle/Corona-Plugin/tree/sdk6

This one works. I just ran it on my Nexus 7 as is. Now that said, most of their sample app is setting up a testing UI and you have to cut through a lot of that code to get to the much easier to implement ad code.

FWIW, the sdk5 was for the most part working too, just that each placement it was trying to load was returning as “Not playable”. So apparently they’ve changed how their placement ID’s work or something and the sdk6 version will show you a proper way to make those calls.

FWIW2, if you log into the Vungle portal and go to their “Helpdesk & Docs” page, under plugins, they have a step-through guide for Corona. This is where I found the new repo above.  

https://support.vungle.com/hc/en-us/articles/360003413891-Get-Started-with-Vungle-SDK-v-6-Corona

Rob