Problems with obtaining an AppLovin banner

Hello!

Did everything as shown: https://forums.coronalabs.com/topic/72057-in-app-advertising/#entry377554

I received the message “GOT INIT”, replaced the listener’s code, AppLovin enabled the test mode on the site and marked the banner display, but the application does not show the banner and in the AppLovin statistics 0 views. What could be the problem?

P.S. My native language is russian.

While this isn’t AppLovin specific, there is a tutorial on implementing ads. Perhaps you could read through it and think about how you’re implementing ads and see if you can see where you might be running into problems.

http://docs.coronalabs.com/tutorial/basics/ads/index.html

Rob

  1. Check the logs and make sure it doesn’t say “No Fill”.

  2. Add a print statement at the top of the event. Something like this always works for me:

    local json = require( “json” ) print(json.prettify(event))

In my experience, Applovin fill rate for banners is very low in certain countries. The dashboards only show views, but not attempts.

@Rob @agramonte  Thank you for responding to my question)

I apologize for my carelessness. I received a message in the Corona console: “PluginSync: plugin com.coronalabs / plugin.applovin needs to be updated for platform win32-sim to build number: 3183”

I downloaded this plugin, but I do not know where to put it.

Ads don’t work in the simulator. Since you’re on Windows, you have to build for Android and run your app on an Android device. If you’re doing simulator builds, you don’t need to download the plugin and put it anywhere. If you’re doing native builds with Android Studio, you do.

Can you provide more details about if you’re doing native or simulator builds and if these messages are coming from the build process, or from running on a device?

Rob

@Rob

Yes, I know that the ads do not work in the simulator. These messages are coming from the build process in the Corona simulator. I make simulator builds, then I upload the apk file to the android device and launch the application, the banner does not appear. The application is added to the AppLovin developer portal. I tried to connect vpn, but it did not work.

Here is the code I used in main.lua:

 local applovin = require( "plugin.applovin" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print("GOT INIT") applovin.show( "banner", "bottom" ) -- bottom or top you choose end if(event.error) then for k,v in pairs( event ) do print( "applovin listener got error ", k, v) end end end -- Initialize the AppLovin plugin applovin.init( adListener, { sdkKey="XXXX" }) -- XXXX my sdkKey

First of all, the message during build is probably not a problem. “win32-sim” is a Lua stub plugin that just prints out messages that ads don’t work in the sim.  

I really suggest you read the tutorial I posted above. There is a section on debugging ads and the code you posted above indicates that you have not implemented any of the debugging code. If you want to know whats going on, you have to add the debugging code and understand how to read your device’s console.log.

Next you should understand how ads work including loading before you show them. How advertisers fill works and more. That tutorial should address everything you need to know.

Rob

@Rob

I used this example https://docs.coronalabs.com/plugin/applovin/show.html#example

Interstitial advertising works great!

I tried to use this code to display a banner, but it did not work:

-- Require the AppLovin plugin local applovin = require( "plugin.applovin" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) -- Load an AppLovin ad applovin.load( "banner" ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded print( event.type ) elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.isError ) print( event.response ) elseif ( event.phase == "displayed" or event.phase == "playbackBegan" ) then -- The ad was displayed/played print( event.type ) elseif ( event.phase == "hidden" or event.phase == "playbackEnded" ) then -- The ad was closed/hidden print( event.type ) elseif ( event.phase == "clicked" ) then -- The ad was clicked/tapped print( event.type ) end end -- Initialize the AppLovin plugin applovin.init( adListener, { sdkKey="XXXX" } ) -- Sometime later, show the ad local isAdLoaded = applovin.isLoaded( "banner" ) if ( isAdLoaded == true ) then applovin.show( "banner", "bottom" ) end

What error did I make in this code?

One of the reasons we write tutorials like the Implementing Ads one (http://docs.coronalabs.com/tutorial/basics/ads/index.html) is so that we don’t have to say the same thing over and over again.

This exact issue is discussed in the tutorial:

“First, initialization doesn’t happen right away. Because initialization makes networking calls, it takes time to complete. You don’t want your app to freeze while this process happens, so the initialization actually happens in the background and control is returned to your app immediately. This means you cannot make other plugin API calls until initialization is complete.”

If you have that exact code in that exact order and “Sometime later” is immediately after the init call. Then there is no way the init() call is done. Sometime later means in another scene, seconds later, not microseconds later.  

Rob

@Rob

I understand, thank you very much)

While this isn’t AppLovin specific, there is a tutorial on implementing ads. Perhaps you could read through it and think about how you’re implementing ads and see if you can see where you might be running into problems.

http://docs.coronalabs.com/tutorial/basics/ads/index.html

Rob

  1. Check the logs and make sure it doesn’t say “No Fill”.

  2. Add a print statement at the top of the event. Something like this always works for me:

    local json = require( “json” ) print(json.prettify(event))

In my experience, Applovin fill rate for banners is very low in certain countries. The dashboards only show views, but not attempts.

@Rob @agramonte  Thank you for responding to my question)

I apologize for my carelessness. I received a message in the Corona console: “PluginSync: plugin com.coronalabs / plugin.applovin needs to be updated for platform win32-sim to build number: 3183”

I downloaded this plugin, but I do not know where to put it.

Ads don’t work in the simulator. Since you’re on Windows, you have to build for Android and run your app on an Android device. If you’re doing simulator builds, you don’t need to download the plugin and put it anywhere. If you’re doing native builds with Android Studio, you do.

Can you provide more details about if you’re doing native or simulator builds and if these messages are coming from the build process, or from running on a device?

Rob

@Rob

Yes, I know that the ads do not work in the simulator. These messages are coming from the build process in the Corona simulator. I make simulator builds, then I upload the apk file to the android device and launch the application, the banner does not appear. The application is added to the AppLovin developer portal. I tried to connect vpn, but it did not work.

Here is the code I used in main.lua:

 local applovin = require( "plugin.applovin" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print("GOT INIT") applovin.show( "banner", "bottom" ) -- bottom or top you choose end if(event.error) then for k,v in pairs( event ) do print( "applovin listener got error ", k, v) end end end -- Initialize the AppLovin plugin applovin.init( adListener, { sdkKey="XXXX" }) -- XXXX my sdkKey

First of all, the message during build is probably not a problem. “win32-sim” is a Lua stub plugin that just prints out messages that ads don’t work in the sim.  

I really suggest you read the tutorial I posted above. There is a section on debugging ads and the code you posted above indicates that you have not implemented any of the debugging code. If you want to know whats going on, you have to add the debugging code and understand how to read your device’s console.log.

Next you should understand how ads work including loading before you show them. How advertisers fill works and more. That tutorial should address everything you need to know.

Rob

@Rob

I used this example https://docs.coronalabs.com/plugin/applovin/show.html#example

Interstitial advertising works great!

I tried to use this code to display a banner, but it did not work:

-- Require the AppLovin plugin local applovin = require( "plugin.applovin" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) -- Load an AppLovin ad applovin.load( "banner" ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded print( event.type ) elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.isError ) print( event.response ) elseif ( event.phase == "displayed" or event.phase == "playbackBegan" ) then -- The ad was displayed/played print( event.type ) elseif ( event.phase == "hidden" or event.phase == "playbackEnded" ) then -- The ad was closed/hidden print( event.type ) elseif ( event.phase == "clicked" ) then -- The ad was clicked/tapped print( event.type ) end end -- Initialize the AppLovin plugin applovin.init( adListener, { sdkKey="XXXX" } ) -- Sometime later, show the ad local isAdLoaded = applovin.isLoaded( "banner" ) if ( isAdLoaded == true ) then applovin.show( "banner", "bottom" ) end

What error did I make in this code?

One of the reasons we write tutorials like the Implementing Ads one (http://docs.coronalabs.com/tutorial/basics/ads/index.html) is so that we don’t have to say the same thing over and over again.

This exact issue is discussed in the tutorial:

“First, initialization doesn’t happen right away. Because initialization makes networking calls, it takes time to complete. You don’t want your app to freeze while this process happens, so the initialization actually happens in the background and control is returned to your app immediately. This means you cannot make other plugin API calls until initialization is complete.”

If you have that exact code in that exact order and “Sometime later” is immediately after the init call. Then there is no way the init() call is done. Sometime later means in another scene, seconds later, not microseconds later.  

Rob

@Rob

I understand, thank you very much)