androidviewadsbannerinmobi

InMobi - Stopping/Hiding banner ads


I'm using InMobi for displaying banners in my game - the ads will need to be turned off when the actual game starts (they only display on menu screens and when the game is paused) and I'm unsure how to do this.

With other networks I use/have used (including MobFox/AdMob), I could do something like this:

banner.pause();
banner.setVisibility(View.GONE);

This would hide the banners and stop requests.

However, in the InMobi SDK, there are no such methods (pause/resume).

If I set the visibility, the banners do disappear, but they keep refreshing (currently set to 60 seconds). This is no good. Requests/refreshes should most definitely, stop when the banners are not visible.

InMobi does have a .setEnabled(); which takes a boolean, but this does absolutely nothing.

Anyone who has used/is using InMobi, I would appreciate a point in the right direction.


Solution

  • Try setting the autorefresh to 0 to disable automatic requests. When you're ready to request for an ad, either request for one manually or re-enable auto refresh with a refresh value of at least 20 seconds, or, preferably, 60 seconds for banner ads