Ads only show up once

Hello so I am making a game and when I load up my app for the first time an ad popups after I lose a banner never seems to appear.

I am using Appodeal. 

This is in my game.lua 

I tried looking on Appodeal for more help because I feel like I must be doing something incorrect.

local appodeal = require("plugin.appodeal") local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization -- Show a banner ad appodeal.show( "banner" , {yAlign = "bottom"}) print("ad") elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.isError ) print( event.response ) end end -- Initialize the Appodeal plugin appodeal.init( adListener, { appKey="MYKEY" } ) -- Sometime later, check if an ad is available if ( appodeal.isLoaded( "banner" ) ) then appodeal.show( "banner" ) end -- Sometime later, hide the ad appodeal.hide( "banner" )

I use to use Admob and had no problem. I am also wondering if I have add something to my main.lua file?

Any help would be amazing, this ad problem is the only thing stopping me from releasing my game.

You have to explicitly call the .show() method when you want to show a banner ad After you call .hide() no banner will show again until you call .show().

Rob

So after loading an Ad if there is any , I call the .hide() then I call .show() again right 

-- Call ad appodeal.show("banner" , {yAlign = "bottom"}

Something like this? Just want to be sure if that is what you mean

I would not call .show() in the listener function. I would maybe set a flag there saying that init is complete, but I would defer calling .show() until you are ready to show the ad. That way you’re not having to hide it right away.

Rob

Just delete the hide banner call.

Thanks will try! Haven’t been home all day so i will try it (:

You have to explicitly call the .show() method when you want to show a banner ad After you call .hide() no banner will show again until you call .show().

Rob

So after loading an Ad if there is any , I call the .hide() then I call .show() again right 

-- Call ad appodeal.show("banner" , {yAlign = "bottom"}

Something like this? Just want to be sure if that is what you mean

I would not call .show() in the listener function. I would maybe set a flag there saying that init is complete, but I would defer calling .show() until you are ready to show the ad. That way you’re not having to hide it right away.

Rob

Just delete the hide banner call.

Thanks will try! Haven’t been home all day so i will try it (: