Adbuddiz fails at showing ads correctly

Hello,

I’m writing here for my last hope, I’m currently using Adbuddiz as my monetization system on my second app, however, trouble is happening when I call the showAd() function Adbuddiz proposes. 

Let me explain the problem, I followed both Corona SDK’s and AdBuddiz’s guides/apis, which means that I enabled the plugin in the config file and that I added this to my app’s files:

in the main.lua:

local composer = require( "composer" ) local AdBuddiz = require "plugin.adbuddiz" AdBuddiz.setAndroidPublisherKey( "TEST\_PUBLISHER\_KEY\_ANDROID" ) AdBuddiz.setTestModeActive() AdBuddiz.cacheAds() composer.gotoScene("menu")

and in my gaveOver.lua scene:

local composer = require( "composer" ) local AdBuddiz = require "plugin.adbuddiz" ... function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then ... elseif ( phase == "did" ) then ... if (math.random(1,3) == 1) then AdBuddiz.showAd() else return false end end ... end

(I tried to shorten the code as much as possible and keep the revelant code)

It works perfectly on the Simulator, well, it opens a dialogue box telling me that the showAd() function is only availible on device, but it pops up at the right time, and one a single time.

On device, the ad sometimes shows up before the scene’s transition, and often it shows up multiple times (Shows up one time, you close the ad, shows up another time after having closed the last ad). I don’t see the reason why it would show up before the transition if I set the showAd() function in the “did” phase and I don’t see why it would show up multiple times if the code is being processed through one time only.

Anyone that could help me? Is it a known bug? Or did I fail somewhere?

Thanks in advance,

Philippe R.

Hi Phillipe,

Nice to e-meet you, I work at AdBuddiz.

First of all, don’t hesitate to contact us at: support at adbuddiz dot com

We do reply to all emails, and if I’m not wrong regarding your name origin, we also speak french FYI :wink:

Regarding your issue, I’m very confident that if you see the ad show up multiple times, it means that you call showAd() multiple times. Add logs to your app or try to follow the execution flow in debug mode to understand what happens.

For your information, on Android, AdBuddiz ad is an Activity which means it will pause the current Corona activity and it will resume afterwards. If the showAd call is made in the resuming code of your app, the problem you describe could happen.

If the ad is shown too early, I think it means that you call showAd() too early as there is no way we could anticipate the call.

In any case, don’t hesitate to try the example app: https://docs.coronalabs.com/daily/plugin/adbuddiz/index.html#sample-code

If you have any more question, please reach to support as we might be a lot faster to reply.

Best,

Hi! Thanks for your reply AdBuddiz.

I solved the issue by simply disabling physics.

AdBuddiz is working fine, it wasn’t the issue.

The scene would only change if the main object would collide with another one. And I discovered by making a debug that my object would listen to multiple collisions, whilst the screen transition is coping fine with multiple processes, this wasn’t the case of adbuddiz, which is understandable as the issue comes from my code being overloaded.

Thanks anyway,

I will mark this thread as solved.

Phil

Hi Phillipe,

Nice to e-meet you, I work at AdBuddiz.

First of all, don’t hesitate to contact us at: support at adbuddiz dot com

We do reply to all emails, and if I’m not wrong regarding your name origin, we also speak french FYI :wink:

Regarding your issue, I’m very confident that if you see the ad show up multiple times, it means that you call showAd() multiple times. Add logs to your app or try to follow the execution flow in debug mode to understand what happens.

For your information, on Android, AdBuddiz ad is an Activity which means it will pause the current Corona activity and it will resume afterwards. If the showAd call is made in the resuming code of your app, the problem you describe could happen.

If the ad is shown too early, I think it means that you call showAd() too early as there is no way we could anticipate the call.

In any case, don’t hesitate to try the example app: https://docs.coronalabs.com/daily/plugin/adbuddiz/index.html#sample-code

If you have any more question, please reach to support as we might be a lot faster to reply.

Best,

Hi! Thanks for your reply AdBuddiz.

I solved the issue by simply disabling physics.

AdBuddiz is working fine, it wasn’t the issue.

The scene would only change if the main object would collide with another one. And I discovered by making a debug that my object would listen to multiple collisions, whilst the screen transition is coping fine with multiple processes, this wasn’t the case of adbuddiz, which is understandable as the issue comes from my code being overloaded.

Thanks anyway,

I will mark this thread as solved.

Phil