revmob.hide()

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

Overview

Hides a RevMob banner ad which was previously shown via revmob.show().

Syntax

revmob.hide( placementId )
placementId (required)

String. The placement ID of the ad you want to hide.

Example

local revmob = require( "plugin.revmob" )

local placementID = "PLACEMENT_ID"

local function adListener( event )

    if ( event.phase == "sessionStarted" ) then  -- Successful initialization
        -- Load a RevMob ad
        revmob.load( "banner", placementID )

    elseif ( event.phase == "loaded" ) then  -- The ad was successfully loaded
        -- Show the ad
        revmob.show( placementID, { yAlign="top" } )
    end
end

-- Initialize RevMob
revmob.init( adListener, { appId="YOUR_APP_ID" } )

-- Sometime later, hide the ad
revmob.hide( placementID )