Type Function Return value Boolean Revision Release 2024.3703 Keywords ads, advertising, AppLovin, isLoaded, AppLovin Max See also applovinMax.show() applovinMax.*
Checks to see if a AppLovin ad is already loaded. Returns true
if an ad is loaded and ready for display, otherwise returns false
.
applovinMax.isLoaded( adType )
String. One of the following values:
"banner"
"interstitial"
"rewardedVideo"
You must enable "Rewarded Video" in the AppLovin developer portal to receive rewarded videos in your app.
local applovinMax = require( "plugin.applovinMax" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) -- Load an AppLovin ad applovinMax.load( "interstitial", {iOSUnitId ="replace with your own", androidUnitId="replace with your own"} ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded print( event.type ) elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.isError ) print( event.response ) end end -- Initialize the AppLovin plugin applovinMax.init( adListener ) -- Sometime later, check if the ad is loaded local isAdLoaded = applovinMax.isLoaded( "interstitial" ) print( isAdLoaded )