Type Function Return value Boolean Revision Release 2025.3721 Keywords ads, advertising, StartApp, isLoaded See also startapp.show() startapp.*
Returns a boolean value whether an ad is loaded and ready for show.
startapp.isLoaded( adType )
String. The ad type to check. Valid values: "interstitial", "video", "rewardedVideo", "offerwall".
local startapp = require( "plugin.startapp" )
local function adListener( event )
if ( event.phase == "init" ) then -- Successful initialization
print( event.provider )
-- Load an StartApp ad
startapp.load( "interstitial" )
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 StartApp plugin
startapp.init( adListener, { appId="Your App ID" } )
-- Sometime later, check if the ad is loaded
print( startapp.isLoaded( "interstitial" ) )