appnext.init()

Type Function
Return value none
Revision Release 2024.3703
Keywords ads, advertising, Appnext, init
See also appnext.createAd()
appnext.*

Overview

This function is used for initializing the listener for all of the plugin events.

Syntax

appnext.init( adListener )
adListener (required)

Listener. Listener function that will receive adEvent events.

Example

local appnext = require( "plugin.appnext" )

local function adListener( event )
    print( "Received " .. event.event .. " for " .. event.adKey .. " with message: " .. event.message )
end

-- Initialize the Appnext plugin
appnext.init( adListener )