Hi,
I have 3 scenes in my game - menu, game, and game over. I show ads in menu and gameover. I have to call ads.show() in menu and gameover, and then ads.hide() in both as well when the user goes to the game scene. Unfortunately this process takes a good 8-10 seconds each time. Nobody’s going to see the banner ad on the game over page because it takes 8 seconds to load.
I feel like I must be doing something wrong. Why is it not caching the ad so it can show it immediately? I think it’s trying to load a new on each time or something like that.
As for the environment, I’m using adMob on a Huawei Android phone running Android 4.0.*.
To show the ads I write in introscene.lua:
[lua]
function scene:show( event )
if (event.phase == “will” and shown == false) then
…
newAd = ads.show( “banner”, { x=0, y=h, appId=bannerAppID } );
local adHeight = ads.height();
[/lua]
To hide it I write also in introscene.lua:
[lua]
function scene:hide(event)
if ( event.phase == “will” ) then
ads.hide();
end
end
[/lua]
It correctly hides ads at scene transition out. Unfortunately it takes 8-10 seconds to load the ad initially (I counted, that’s not just a frustrated guesstimate). If you have any ideas what to do I would appreciate it.
Thanks!