Type Function Return value none Revision Release 2022.3683 Keywords ads, advertising, StartApp, hide See also startapp.show() startapp.*
Shows a StartApp splash ad immediately after the application is launched. A Splash Ad first displays a pre-defined full page splash screen that you can customize (as described below) followed by a full page ad.
To use splash ad, call startapp.showSplash()
only once, immediately after startapp.init()
.
startapp.showSplash( [ params ] )
Table. Table containing additional configuration for the splash screen — see the next section for details.
The params
table includes configuration for the splash screen.
String. Use one of six options to specify a design theme for the full page splash screen: "deep_blue"
(default), "sky"
, "ashen_sky"
, "blaze"
, "gloomy"
, "ocean"
.
String. Sets the application name to be used in the splash screen.
String. Sets the orientation to be used in the splash screen. Valid values are
"portrait"
(default), "landscape"
, "auto"
(use the device's orientation upon entering the application).
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" ) end end -- Initialize the StartApp plugin startapp.init( adListener, { appId = "Your App ID" } ) -- Show the StartApp splash startapp.showSplash( { appName = "Your App Name" } )