So this is what I did:
In my build.settings file, I added this:
-- Plugins section -- plugins = { ["plugin.kidoz"] = { publisherId = "com.coronalabs" }, },
And this is what I added to my main.lua:
I declared variable kidoz as global.
kidoz = require( "plugin.kidoz" ) function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.provider ) end end -- Initialize the KIDOZ plugin kidoz.init( adListener, { publisherID="#####", securityToken="abcdefghigklmnop" } )
(publisherID and securityToken concealed for some good reasons…)
And this in the scene:create function of the scene I want the ad to be displayed:
kidoz.load( "interstitial" )
And added this code in the “did” phase of the scene:show function of the scene I want the ad to be displayed:
kidoz.show( "interstitial" )
And this in the “did” phase of the scene:hide function:
kidoz.hide( "interstitial" )
__________________________________________
So that’s what I did.
When run on pc, the console says:
kidoz.init() WARNING: The KIDOZ plugin is only supported on Android & iOS devices. Please build for device
kidoz.load() WARNING: The KIDOZ plugin is only supported on Android & iOS devices. Please build for device
kidoz.show() WARNING: The KIDOZ plugin is only supported on Android & iOS devices. Please build for device
So I built for android, and got it into my phone that runs the latest version of android, android pie.
The game works fine. But the ad doesn’t show up. Waited 10 mins on the scene. Still no response.
Help…