admob banner returning "shown"

Hi,

I have been using admob interstitials and banners for years but came across something when building  for IOS.

when the banner ad is displayed is it triggering the adlistener “shown” phase ?

I stripped everything down to just a banner ad, is this normal ?

I am pretty sure is isn’t.

Thanks

Hi @bubblebobble,

Can you please clarify? What behavior are you currently seeing? How does it differ from what you expect should happen?

Brent

Hi Brent, To simplify. I use both banners and interstials together often in lots of apps, I use the admob v2 Apis. Android is working as expected, no problems. I came to port a recent app to iOS and hit an issue I couldn’t quite understand. I was using both types of ads as per android version but getting weird behaviour. Basically the adlistener callback was being triggered. So, I removed everything until I had left a main.lua and just the admob calls. I initialise admob with a single banner And nothing else. In the adlistener I get a “shown” phase triggered all the time. Running latest daily build also. I must be missing something, but iam kinda baffled. Thanks

right here is the code , nothing else in main.lua, no external libs , nothing.

Why when the banner ad is loaded does it return a “shown” phase triggered in the adlistener ???

[lua]

ads = require"ads"

local provider = “admob”

local appID = “ca-app-pub-xxxxxxxxxxx51”     --banner

local appID2 = “ca-app-pub-xxxxxxxxxxxxx59” – interstitial

 function adListener(event)

     if event.phase == “shown” then

         print("…>> ads shown<<…")

     end

end

 adX = display.screenOriginX

 adY =  display.screenOriginY +100000

ads.init(provider, appID2, adListener) – no difference init ing either appID

ads.show(“banner”, { x = adX, y = adY, appId =“ca-app-pub-xxxxxxxxxxxxx51” })[/lua]

Ah, re read the api I see it should do this so just set a flag in the code to determine what is sending the phase.

Hi @bubblebobble,

Can you please clarify? What behavior are you currently seeing? How does it differ from what you expect should happen?

Brent

Hi Brent, To simplify. I use both banners and interstials together often in lots of apps, I use the admob v2 Apis. Android is working as expected, no problems. I came to port a recent app to iOS and hit an issue I couldn’t quite understand. I was using both types of ads as per android version but getting weird behaviour. Basically the adlistener callback was being triggered. So, I removed everything until I had left a main.lua and just the admob calls. I initialise admob with a single banner And nothing else. In the adlistener I get a “shown” phase triggered all the time. Running latest daily build also. I must be missing something, but iam kinda baffled. Thanks

right here is the code , nothing else in main.lua, no external libs , nothing.

Why when the banner ad is loaded does it return a “shown” phase triggered in the adlistener ???

[lua]

ads = require"ads"

local provider = “admob”

local appID = “ca-app-pub-xxxxxxxxxxx51”     --banner

local appID2 = “ca-app-pub-xxxxxxxxxxxxx59” – interstitial

 function adListener(event)

     if event.phase == “shown” then

         print("…>> ads shown<<…")

     end

end

 adX = display.screenOriginX

 adY =  display.screenOriginY +100000

ads.init(provider, appID2, adListener) – no difference init ing either appID

ads.show(“banner”, { x = adX, y = adY, appId =“ca-app-pub-xxxxxxxxxxxxx51” })[/lua]

Ah, re read the api I see it should do this so just set a flag in the code to determine what is sending the phase.