appodeal.hide()

Type Function
Return value none
Revision 2017.3060
Keywords ads, advertising, Appodeal, hide
See also appodeal.show()
appodeal.*

Overview

Hides a currently displayed Appodeal banner ad. Does not apply to interstitial or video ads.

Syntax

appodeal.hide( adUnitType )
adUnitType (required)

String. The type of ad to hide. This should always be set to "banner".

Example

local appodeal = require( "plugin.appodeal" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        -- Show a banner ad
        appodeal.show( "banner", { yAlign="top" } )

    elseif ( event.phase == "failed" ) then  -- The ad failed to load
        print( event.type )
        print( event.isError )
        print( event.response )
    end
end

-- Initialize the Appodeal plugin
appodeal.init( adListener, { appKey="YOUR_APP_KEY" } )

-- Sometime later, hide the ad
appodeal.hide( "banner" )