startapp.showSplash()

Type Function
Return value none
Revision 2018.3333
Keywords ads, advertising, StartApp, hide
See also startapp.show()
startapp.*

Overview

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.

Gotchas

To use splash ad, call startapp.showSplash() only once, immediately after startapp.init().

Syntax

startapp.showSplash( [ params ] )
params (optional)

Table. Table containing additional configuration for the splash screen — see the next section for details.

Parameter Reference

The params table includes configuration for the splash screen.

theme (optional)

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".

appName (optional)

String. Sets the application name to be used in the splash screen.

orientation (optional)

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).

Example

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" } )