ads:hide() not working

I’m using the following code (with a listener before) in my main lua file:

_G.ads.init (“iads”,id,_G.adListener)

_G.ads.init(“admob”,id2,_G.adListener)

then I set the current provider and later in the code I switch between both.

Now I have encountered a problem using

_G.ads.hide()

After calling this I still have ads on the screen.

Is this because I use the same global _G.ads with two inits?

Thx!

Daniela

I have two inits too, and ads.hide() works for me…

You may need to provide more information, such as the complete code (for ads part)

Thank you for your fast feedback. I guess I have found the part I was missing:

“If you wish to use different ad providers in different scenes of your app, you should hide the current ads before calling ads.init() with the new provider.”

I haven’t done this, so probably this is causing the problem.

Hi Daniela,

Did you check out this tutorial on using multiple providers?

http://coronalabs.com/blog/2013/11/19/tutorial-using-multiple-ad-networks/

Best regards,

Brent

I have two inits too, and ads.hide() works for me…

You may need to provide more information, such as the complete code (for ads part)

Thank you for your fast feedback. I guess I have found the part I was missing:

“If you wish to use different ad providers in different scenes of your app, you should hide the current ads before calling ads.init() with the new provider.”

I haven’t done this, so probably this is causing the problem.

Hi Daniela,

Did you check out this tutorial on using multiple providers?

http://coronalabs.com/blog/2013/11/19/tutorial-using-multiple-ad-networks/

Best regards,

Brent