Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Appodeal displays multiple interstitial ads stacked on top of one another
Started by gamebit.labs Jan 08 2019 12:54 AM

20 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

gamebit.labs

[GLOBAL: userInfoPane.html]
gamebit.labs
  • Contributor

  • 181 posts
  • Corona SDK

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' },


[TOPIC: post.html]
#2

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,130 posts
  • Corona SDK

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



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,646 posts
  • Enterprise

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



[TOPIC: post.html]
#4

gamebit.labs

[GLOBAL: userInfoPane.html]
gamebit.labs
  • Contributor

  • 181 posts
  • Corona SDK

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



[TOPIC: post.html]
#5

simeonaronk

[GLOBAL: userInfoPane.html]
simeonaronk
  • Enthusiast

  • 32 posts
  • Corona SDK

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

Attached Files



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,646 posts
  • Enterprise

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

 

Rob



[TOPIC: post.html]
#7

gamebit.labs

[GLOBAL: userInfoPane.html]
gamebit.labs
  • Contributor

  • 181 posts
  • Corona SDK

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

 

Rob

 

Thanks Rob!

 

Ben



[TOPIC: post.html]
#8

gamebit.labs

[GLOBAL: userInfoPane.html]
gamebit.labs
  • Contributor

  • 181 posts
  • Corona SDK

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

 

Rob

Hi Rob,

 

Any insights?

 

Ben



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,646 posts
  • Enterprise

Nothing yet.



[TOPIC: post.html]
#10

araman777

[GLOBAL: userInfoPane.html]
araman777
  • Observer

  • 1 posts
  • Corona SDK

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?



[TOPIC: post.html]
#11

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,130 posts
  • Corona SDK

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.



[TOPIC: post.html]
#12

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,130 posts
  • Corona SDK

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.

 

Attached File  Screen Shot 2019-01-25 at 2.18.36 PM.png   66.38KB   1 downloads

 



[TOPIC: post.html]
#13

gamebit.labs

[GLOBAL: userInfoPane.html]
gamebit.labs
  • Contributor

  • 181 posts
  • Corona SDK

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. :)

 

Ben



[TOPIC: post.html]
#14

sergimolina91

[GLOBAL: userInfoPane.html]
sergimolina91
  • Observer

  • 5 posts
  • Corona SDK

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



[TOPIC: post.html]
#15

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,130 posts
  • Corona SDK

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?



[TOPIC: post.html]
#16

sergimolina91

[GLOBAL: userInfoPane.html]
sergimolina91
  • Observer

  • 5 posts
  • Corona SDK

Hello,

 

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

 

Sergi



[TOPIC: post.html]
#17

sergimolina91

[GLOBAL: userInfoPane.html]
sergimolina91
  • Observer

  • 5 posts
  • Corona SDK

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



[TOPIC: post.html]
#18

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,646 posts
  • Enterprise

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

 

Rob



[TOPIC: post.html]
#19

sergimolina91

[GLOBAL: userInfoPane.html]
sergimolina91
  • Observer

  • 5 posts
  • Corona SDK

Thank you Rob.



[TOPIC: post.html]
#20

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,130 posts
  • Corona SDK

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.



[TOPIC: post.html]
#21

sergimolina91

[GLOBAL: userInfoPane.html]
sergimolina91
  • Observer

  • 5 posts
  • Corona SDK

Ok, I will try that combination and see if it works.
 

Cheers!




[topic_controls]
[/topic_controls]