Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Vungle v4 Documentation
Started by Fernker Mar 02 2018 10:21 AM

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

Fernker

[GLOBAL: userInfoPane.html]
Fernker
  • Enthusiast

  • 44 posts
  • Corona SDK

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!



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,588 posts
  • Corona SDK

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 ) 


[TOPIC: post.html]
#3

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,588 posts
  • Corona SDK

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


ads.setCurrentProvider("vungle")
ads.isAdAvailable()

--

ads.setCurrentProvider("vungle")
ads.getVersionString()

--


etc.


[TOPIC: post.html]
#4

Fernker

[GLOBAL: userInfoPane.html]
Fernker
  • Enthusiast

  • 44 posts
  • Corona SDK

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



[TOPIC: post.html]
#5

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,588 posts
  • Corona SDK

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

 

I don't.



[TOPIC: post.html]
#6

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,588 posts
  • Corona SDK

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.



[TOPIC: post.html]
#7

Fernker

[GLOBAL: userInfoPane.html]
Fernker
  • Enthusiast

  • 44 posts
  • Corona SDK

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.



[TOPIC: post.html]
#8

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,588 posts
  • Corona SDK

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



[TOPIC: post.html]
#9

Fernker

[GLOBAL: userInfoPane.html]
Fernker
  • Enthusiast

  • 44 posts
  • Corona SDK

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



[TOPIC: post.html]
#10

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,588 posts
  • Corona SDK

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



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,053 posts
  • Enterprise

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



[TOPIC: post.html]
#12

Fernker

[GLOBAL: userInfoPane.html]
Fernker
  • Enthusiast

  • 44 posts
  • Corona SDK

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.



[TOPIC: post.html]
#13

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,588 posts
  • Corona SDK

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.



[TOPIC: post.html]
#14

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,120 posts
  • Corona SDK

I use both and both work just fine



[TOPIC: post.html]
#15

contact444

[GLOBAL: userInfoPane.html]
contact444
  • Observer

  • 14 posts
  • Corona SDK

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?



[TOPIC: post.html]
#16

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,053 posts
  • Enterprise

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



[TOPIC: post.html]
#17

contact444

[GLOBAL: userInfoPane.html]
contact444
  • Observer

  • 14 posts
  • Corona SDK

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?



[TOPIC: post.html]
#18

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,053 posts
  • Enterprise

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



[TOPIC: post.html]
#19

contact444

[GLOBAL: userInfoPane.html]
contact444
  • Observer

  • 14 posts
  • Corona SDK

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?



[TOPIC: post.html]
#20

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,053 posts
  • Enterprise

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



[TOPIC: post.html]
#21

contact444

[GLOBAL: userInfoPane.html]
contact444
  • Observer

  • 14 posts
  • Corona SDK

So I was able to setup the adb and read the logs. 

 

Init passed in both cases - with my AppId and the demo AppId which was in the sample app to start with. 

 

But the ad placement loading returned false in all cases. 



[TOPIC: post.html]
#22

contact444

[GLOBAL: userInfoPane.html]
contact444
  • Observer

  • 14 posts
  • Corona SDK

I did try the Sample v6 as well. 

It did work perfectly using the default AppID and placement IDs. 

 

But it deosnt seem to work with my Vungle App credentials.

 

My Vungle app is in Test mode. Should it NOT work in Test mode?

 

 

PS: I've dropped in a message to Vungle Support team via email. But havent heard back anything from them yet. 



[TOPIC: post.html]
#23

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,120 posts
  • Corona SDK

Vungle SDK6 works great (finally!!)... I am porting my games over as we speak.  

 

As long as you have the right app id and placement ids it works just fine.  If it works using their defaults but not yours then your credentials are probably incorrectly configured.

 

Test mode will always work on devices.



[TOPIC: post.html]
#24

contact444

[GLOBAL: userInfoPane.html]
contact444
  • Observer

  • 14 posts
  • Corona SDK

SGS 

 

Could you share how your placement IDs look like?



[TOPIC: post.html]
#25

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,053 posts
  • Enterprise

Here is a screenshot from my Vungle developer portal for placements:

 

Attached File  Screen Shot 2018-05-22 at 1.50.12 PM.png   24.36KB   1 downloads

 

I created a placement I named "billybob". Vungle gave it a ReferenceID of BILLYBOB-4245367

 

Looking at their sdk6 code, 

if (platform == "Android") then
    appData = {
        appID="5ae0db55e2d43668c97bd65e",
        placement1 = "DEFAULT-6595425",
        placement2 = "DYNAMIC_TEMPLATE_REWARDED-5271535",
        placement3 = "FLEX_VIEW-4423991"
    }
else 

You would use the string that's been uppercased and had a number attached to it as the placementID.

 

Rob

 

 




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]