Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How do you know if a Vungle ad has loaded?
Started by davemikesell Jan 06 2020 06:57 PM

7 replies to this topic

Best Answer agramonte , 07 January 2020 - 10:21 AM

Those docs are usually very old in my code. I check for three values on the event:

if event.type == "adAvailable" and event.isAdPlayable == true then
  if event.placementID == <yourPlacementForInterstitial> then
interstitialAvailable = true -- store it in a variable.
end

end

The new documentation can be found on vungle's site. They update the plugin but do not update the docs on the site:

 

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

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

davemikesell

[GLOBAL: userInfoPane.html]
davemikesell
  • Contributor

  • 543 posts
  • Corona SDK

I'm using build 3565 and the Vungle 5 api.   The load method doesn't return anything, nor does there appear too be an ad listener event type or phase that gets trigged on a successfully loaded ad.

 

How can you tell if it worked before you display a black screen?



[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Corona Geek

  • 1,271 posts
  • Corona SDK

If you need help with code related issues, you should show what you've tried so far.

 

Have you tried inserting the following loop inside the listener and seeing what pops out?

for i, j in pairs ( event ) do
    print( i, j )
end 


[TOPIC: post.html]
#3

davemikesell

[GLOBAL: userInfoPane.html]
davemikesell
  • Contributor

  • 543 posts
  • Corona SDK

I'm echoing the event type and phase in the listener now, will do that next.   

 

It would help if the docs were a little more informative, too.

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



[TOPIC: post.html]
#4

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Corona Geek

  • 1,271 posts
  • Corona SDK

Based on the docs that you linked, I would expect that what you are looking for is the "isAdPlayable" property. Did you try that?


  • pixec likes this

[TOPIC: post.html]
#5

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,424 posts
  • Corona SDK

  Best Answer

Those docs are usually very old in my code. I check for three values on the event:

if event.type == "adAvailable" and event.isAdPlayable == true then
  if event.placementID == <yourPlacementForInterstitial> then
interstitialAvailable = true -- store it in a variable.
end

end

The new documentation can be found on vungle's site. They update the plugin but do not update the docs on the site:

 

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


  • joecoronasdk likes this

[TOPIC: post.html]
#6

davemikesell

[GLOBAL: userInfoPane.html]
davemikesell
  • Contributor

  • 543 posts
  • Corona SDK

Very helpful (especially the Vungle docs), marking as Solved.   Thanks everyone.



[TOPIC: post.html]
#7

pixec

[GLOBAL: userInfoPane.html]
pixec
  • Contributor

  • 222 posts
  • Corona SDK

Isnt corona plugin v5 and that vungle doc is for v6?

[TOPIC: post.html]
#8

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,424 posts
  • Corona SDK

No. There is no other plugin. The is only one plugin and it is version 6 (currently). Vungle manages / updates their own plugin. Not sure why they never bother updating the corona documentation, but they do update their site documentation.

 

Both documentation on the corona site (v5) and vungle site (v6) state to add the plugin you should. So unless there is some magic it just downloads v6:

plugins =
    {
        ["plugin.vungle"] =
        {
            publisherId = "com.vungle"
        },
    },

The corona site (v4) is different:

plugins =
    {
        ["CoronaProvider.ads.vungle"] =
        {
            publisherId = "com.vungle"
        },
    }, 

  • pixec likes this


[topic_controls]
[/topic_controls]