Type Function Return value none Revision Release 2024.3703 Keywords ads, advertising, vungle See also vungle-v4.show() vungle-v4.*
vungle-v4.init()
initializes the Corona ads
library by specifying the name of the ad network service provider and the application identifier.
Once the ads
library is initialized, you can request an ad using vungle-v4.show().
vungle-v4.init( providerName, appId [, adListener] )
String. String value for the provider name. For Vungle, use "vungle"
.
String. String containing the app ID.
Listener. The function or table that will handle ad lifecycle events from the Vungle plugin. Vungle notifies you of the following events:
name |
"adsRequest" |
provider |
"vungle" |
type |
"adStart" |
isError |
false if an ad started playing; true if an ad could not be played |
response |
reason why ad could not be played if isError is true |
name |
"adsRequest" |
provider |
"vungle" |
type |
"adView" |
isError |
false |
totalAdSeconds |
the total length of the video in seconds |
secondsWatched |
the length of the longest view by the user, in seconds |
isCompletedView |
true if the user watched 80% of the video; false otherwise |
name |
"adsRequest" |
provider |
"vungle" |
type |
"adEnd" |
isError |
false |
wasCallToActionClicked |
true if the user clicked on the call-to-action (usually “Download”); false otherwise |
name |
"adsRequest" |
provider |
"vungle" |
type |
"cachedAdAvailable" |
isError |
false |