Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

applovin confusion
Started by naughtymachinegun May 02 2018 04:18 AM

3 replies to this topic

Best Answer naughtymachinegun , 03 May 2018 - 05:59 AM

UPDATE

 

So after mailing corona about my applovin changes It now works correctly

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

naughtymachinegun

[GLOBAL: userInfoPane.html]
naughtymachinegun
  • Observer

  • 3 posts
  • Corona SDK

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" )

 

- create()
function scene:create( event )
    applovin.load( "banner" )

 

 

- show()
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
 


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,315 posts
  • Corona Staff

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



[TOPIC: post.html]
#3

naughtymachinegun

[GLOBAL: userInfoPane.html]
naughtymachinegun
  • Observer

  • 3 posts
  • Corona SDK

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


[TOPIC: post.html]
#4

naughtymachinegun

[GLOBAL: userInfoPane.html]
naughtymachinegun
  • Observer

  • 3 posts
  • Corona SDK

  Best Answer

UPDATE

 

So after mailing corona about my applovin changes It now works correctly




[topic_controls]
[/topic_controls]