Type Function Return value none Revision 2017.3060 Keywords ads, advertising, RevMob, show See also revmob.init() revmob.load() revmob.isLoaded() revmob.*
Shows a RevMob ad which was previously loaded via revmob.load().
revmob.show( placementId [, params] )
String. The placement ID of the ad you want to show.
Table. Optional table containing placement customization values — see the next section for details.
The params table includes parameters to customize the ad placement.
String. The vertical alignment of a RevMob banner ad. Valid options are "top", "center", or "bottom".
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" } )