Applovin init() doesn't work

Hello, I’m trying to integrate an Applovin plugin in my app, but when I’m testing it on an Android device nothing happens - app works fine, but no ads is shown, and this app doesn’t even appear in Manage apps section on Applovin Development portal. But the example app works fine, so I assume it’s not a device problem.

My Main.lua:

local applovin = require( "plugin.applovin" ) local sdkKey = "V3MO......................4XckG" applovin.init( adListener, { sdkKey=sdkKey, verboseLogging=false, testMode=true } ) local function adListener( event ) -- Successful initialization of the AppLovin plugin if ( event.phase == "init" ) then -- An ad loaded successfully elseif ( event.phase == "loaded" ) then -- The ad was displayed/played elseif ( event.phase == "displayed" or event.phase == "playbackBegan" ) then -- The ad was closed/hidden elseif ( event.phase == "hidden" or event.phase == "playbackEnded" ) then -- The user clicked/tapped an ad elseif ( event.phase == "clicked" ) then -- The ad failed to load elseif ( event.phase == "failed" ) then -- The user declined to view a rewarded/incentivized video ad elseif ( event.phase == "declinedToView" ) then -- The user viewed a rewarded/incentivized video ad elseif ( event.phase == "validationSucceeded" ) then -- The incentivized/rewarded video ad and/or reward exceeded quota, failed, or was rejected elseif ( event.phase == "validationExceededQuota" or event.phase == "validationFailed" or event.phase == "validationRejected" ) then end end applovin.load( "interstitial" ) timer.performWithDelay( 10000, function() local isAdLoaded = applovin.isLoaded( "interstitial" ) if ( isAdLoaded == true ) then applovin.show( "interstitial" ) end end )

build.settings:

settings = { orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown" }, }, android = { versionCode = "10", usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, usesFeatures = { { name="android.hardware.audio.output", required=false }, { name="android.hardware.screen.portrait", required=true }, { name="android.hardware.faketouch", required=true }, }, usesExpansionFile = false, }, excludeFiles = { -- Exclude iOS launch screen bundle on Android devices android = { "LaunchScreen.storyboardc" }, }, plugins = { ["plugin.applovin"] = { publisherId = "com.coronalabs" }, }, }

config.lua:

application = { content = { width = 320, height = 480, scale = "letterbox", fps = 30, xAlign = "center", yAlign = "center", imageSuffix = { ["@2"] = 2.000, }, }, }

Using Corona Simulator 2017.3135 (Sep  7 2017 02:44:35).

Your .init() call should be after your adListener() function.  I would also turn on verbose logging until you get it working.

Rob

Thanks for help!

Your .init() call should be after your adListener() function.  I would also turn on verbose logging until you get it working.

Rob

Thanks for help!