Hi cleaver people of the internet ,
I want to put some banner ads on my amazing cool app
But i have a few questions regarding applovin
I made my app out of 4 scenes via composer
Now i followed the guidelines via https://docs.coronalabs.com/plugin/applovin/index.html
Tried a bunch of stuff nothing works
For now ive put in the plugin in build settings
and
local applovin = require( “plugin.applovin” ) and applovin.init( adListener, { sdkKey=“key”} ) in main.lua
Applovin recognized my app and i have set the settings to banners
then I went in to one my scenes for example mainScreen.lua
local applovin = require( “plugin.applovin” )
function scene:create( event )
applovin.load( “banner” )
function scene:show( event )
applovin.show( “banner” )
but no ads
Im not asking you to code everything for me But please can someone send me in the right direction
to make this work
Thank you
rob
May 2, 2018, 4:12pm
2
Do you have an adListener function in main.lua? Can you post that? Also you should put some print statements in that function to dump out any errors being returned by the plugin.
Rob
Dear rob,
I did some more digging and now have this in the main.lua
local function adListener( event )
if ( event.phase == “init” ) then – Successful initialization
print( event.isError )
applovin.load( “interstitial” )
elseif ( event.phase == “loaded” ) then – The ad was successfully loaded
print( event.type )
applovin.show( “interstitial”)
elseif ( event.phase == “failed” ) then – The ad failed to load
print( event.type )
print( event.isError )
print( event.response )
end
end
– Initialize the AppLovin plugin
applovin.init( adListener, { sdkKey=“KEYHERE” } )
local isAdLoaded = applovin.isLoaded( “interstitial” )
if ( isAdLoaded == true ) then
applovin.show( “interstitial” )
end
This works on doing a video ad but changing “interstitial” to “banner”
Does not trigger a banner
I have changed the setting on the applovin site to banner but it does not seem to work
Might it have to do with that i have to mail corona about my changes?
Thanks
UPDATE
So after mailing corona about my applovin changes It now works correctly
rob
May 2, 2018, 4:12pm
5
Do you have an adListener function in main.lua? Can you post that? Also you should put some print statements in that function to dump out any errors being returned by the plugin.
Rob
Dear rob,
I did some more digging and now have this in the main.lua
local function adListener( event )
if ( event.phase == “init” ) then – Successful initialization
print( event.isError )
applovin.load( “interstitial” )
elseif ( event.phase == “loaded” ) then – The ad was successfully loaded
print( event.type )
applovin.show( “interstitial”)
elseif ( event.phase == “failed” ) then – The ad failed to load
print( event.type )
print( event.isError )
print( event.response )
end
end
– Initialize the AppLovin plugin
applovin.init( adListener, { sdkKey=“KEYHERE” } )
local isAdLoaded = applovin.isLoaded( “interstitial” )
if ( isAdLoaded == true ) then
applovin.show( “interstitial” )
end
This works on doing a video ad but changing “interstitial” to “banner”
Does not trigger a banner
I have changed the setting on the applovin site to banner but it does not seem to work
Might it have to do with that i have to mail corona about my changes?
Thanks
UPDATE
So after mailing corona about my applovin changes It now works correctly