Appodeal displays multiple interstitial ads stacked on top of one another

When displaying interstitial ads, we’re seeing Admob and Applovin displaying simultaneously, stacked on top of one another. If they are both video ads, they will play at the same time. Really annoying.

The only way i could solve the issue is to remove the Applovin plugin:

 ['plugin.appodeal.beta.base'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.AmazonAds'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.GoogleAdMob'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.TwitterMoPub'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.StartApp'] = { publisherId = 'com.coronalabs' }, -- Interstitial --['plugin.appodeal.beta.AppLovin'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.Unity'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.IronSource'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.Vungle'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.Chartboost'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.AdColony'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.Tapjoy'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.beta.InMobi'] = { publisherId = 'com.coronalabs' },

Never seen this. Use appodeal on all my apps. Can you post your code?

Are you by any chance showing the insterstitials in a Composer scene:show() call? If so are you properly checking the event.phase()? scene:show() gets called twice, once before the scene is transitioned on screen and once afterewards. If you’re not restricting API calls in scene:show() to a specific phase, they will get called twice.

Rob

Hi Rob, thanks for the tip!

Ben

Hi Rob,

   Please check the attached screenshots. We called once the appodeal show function on scene hide. But it displayed 2 ads. in the image you can see the Ipad Log details. 

<— appodeal ad Show : interstitial ----> is trigger when we call the ad show function. the remaining log at the bottom are appodeal listener phase.

Thanks

I’ve reached out to Appodeal to see if I can find an answer.

Rob

Thanks Rob!

Ben

Hi Rob,

Any insights?

Ben

Nothing yet.

Hey Ben, I can’t reproduce the problem in my project.
Can you confirm that you have the same behavior in the sample project? What version of corona do you use?

I can’t replicate it either. Since this was posted I have released 2 app updates in the iOS and Android store. None of them exhibit this behavior.

So I just tried again and it still works for me no duplicates. This most of my code (a class that generates provider based on configuration is missing):

local json = require( "json" ) local appodeal = require( "plugin.appodeal" ) local adProvider = {} adProvider.options = {} adProvider.isReady = false adProvider.justRewarded = false adProvider.providerName = "appodeal" adProvider.adListener = function(event) if adProvider.options.debug == true then print("+++++Appodeal:",json.prettify(event)) end if event.phase == "init" then -- Successful initialization adProvider.isReady = true adProvider.options.dispatcher:dispatchEvent( { name="ads", provider=adProvider.providerName, type="", phase="init" } ) elseif event.data ~= nil and event.type == "rewardedVideo" and event.data.name == "reward" and event.phase == "playbackEnded" then adProvider.justRewarded = true adProvider.options.dispatcher:dispatchEvent( { name="ads", phase="reward" } ) elseif event.type == "banner" and event.phase == "loaded" then elseif event.type == "rewardedVideo" and event.phase == "closed" then if adProvider.justRewarded == false then adProvider.options.dispatcher:dispatchEvent( { name="ads", type="rewarded", phase="closed" } ) end adProvider.justRewarded = false elseif event.phase == "closed" and event.type == "interstitial" then adProvider.options.dispatcher:dispatchEvent( { name="ads", type="interstitial", phase="closed" } ) end end adProvider.isAvailable = function(adType) if adType == "interstitial" or adType == "rewardedVideo" or adType == "banner" then local isLoaded = appodeal.isLoaded( adType ) return isLoaded end return false end adProvider.show = function(adType, options) if adProvider.isReady == true then if adProvider.isAvailable(adType) then if adType == "banner" then appodeal.show( "banner", { yAlign=options.y} ) return true else appodeal.show(adType) return true end else return false end else return false end end adProvider.hide = function(adType) if adType == "banner" then appodeal.hide( "banner" ) end end adProvider.init = function(options) adProvider.options = options appodeal.init( adProvider.adListener, { appKey=options.id, disableWriteExternalPermissionCheck=true, testMode=adProvider.options.debug, hasUserConsent=adProvider.options.consent } ) end return adProvider

When I call interstitial only one is shown. I had the banner.

Hey guys, thanks for the reply.

Our implementation method appears to be the problem. We tested the sample project and the behavior did not show.

So we’re still scratching our heads. :slight_smile:

Ben

Hi Ben,

I have the same problem, two ads displayed with just one appodeal.show(‘interstitial’) call. Have you discovered the reason behind it?

Regards,

Sergi

Sergi what does your code look like? Can you download the sample project, change the id and the project so it matches your project and see if you get duplicates?

Hello,

I have tested with the sample project, and I get also two ads.

Sergi

I forgot to say that I am using the build 2018.3326, the last public release if I understand well.

I’ll see if I can get an engineer to look at this.

Rob

Thank you Rob.

I am using the module based betta appodeal and version Version 2019.3468 (2019.2.27) of corona and do not have that issue. You can download any of my apps on Android or iOS if you want to try it yourself.