In my app, I have a banner ad which shows at the top of the screen at certain times (main menu and scenes that are inbetween levels, end of game etc.... basically, anything that is not actual gameplay).
I'm using the MobFox SDK and I'm using mediation with AdMob so I get AdMob banners when MobFox doesn't load one.
What I want to know is, how do you stop showing ads while stopping the 'refresh timer' as well?
There are 2 methods. I was previously using:
adView.setVisibility(View.GONE);
The problem with the above is that although the banner disappears from view, it keeps refreshing while in the background. This, is most definately not what I want.
So, the next logical step (and one that I've been advised to use in the past is):
adview.pause();
adView.setVisibility(View.GONE);
OK, so the ad disappears and is no longer updated. Brilliant......well, not quite. On resuming with:
adView.resume();
adView.setVisibility(View.VISIBLE);
The Ad returns to the view, but we have to wait the entire refresh time (mine is set at 30 seconds) until the banner changes.
This means, that if the user uses my app for say, 15 minues, it's very possible (and extremely likely) that they will only ever see one Ad throughout the entire session.
So what I'm after is simply a way (which I would have thought would be the standard way) to have the banner not update, but remember where its timer was so that when it resumes it can pick up where it left off
This would mean that if the user spends 20 seconds on the main menu, then plays the game, when he finishes a level, we only have to wait 10 seconds for the banner to complete it's natural refresh cycle and be replaced with a new banner.
Is this how things should work? What am I missing?
I don't believe there is a way to do what you want. You don't have that level of control over the timers used by the AdView as it is an internal attribute.